Hello ,
Actually, Hoa has an autoloader. It is always loaded, most of the time avec Composer’s one, to catch flex entities (i.e. Hoa\X\Y
is unfolded into Hoa\X\Y\Y
if it does not exist).
This autoloader belongs to the Hoa\Consistency
library.
To manually include Hoa without Composer, you have to retrieve all the dependencies by yourself, and then:
require '…/Consistency/Prelude.php';
That’s it.
If you would like the hoa://
protocol, you have to add defined in the Hoa\Protocol
library:
require '…/Protocol/Wrapper.php';
Basically, all you have to do, is to manually load the files that are automatically loaded by Composer. These are very few. To retrieve them:
$ ag 'files": \[' */composer.json
Consistency/composer.json
[1] 38: "files": ["Prelude.php"]
Irc/composer.json
[2] 35: "files": [ "Socket.php" ]
Protocol/composer.json
[3] 36: "files": ["Wrapper.php"]
Websocket/composer.json
[4] 44: "files": ["Socket.php"]
we have only 4 files, for respectively Hoa\Consistency
, Hoa\Irc
, Hoa\Protocol
and Hoa\Websocket
. For consistency and protocol, there are mandatory most of the time. For IRC and WebSocket, this is for the irc://
and ws://
support, so not mandatory whilst being very useful.
However, Composer catches all the version issues. Even if we are in rolling-release and that every master
branch will work, you may encounter some surprises.
What do you think we should do? Documenting this side-installation?