I began plugin development at the hackathon at PHPTek, and I installed my phergie environment using a tarred up thing. But I'm not having some problems running phergie locally. I cannot seem to figure it out, so here is a foundational bit that I cannot get from the documentation.
Should I composer install from the composer.json file on the readme?
{
"require": {
"phergie/phergie-irc-bot-react": "^1.3"
}
}
If so, where do I put my plugin? If I try to include it in the composer.json file, nothing is being installed.
{
"require": {
"phergie/phergie-irc-bot-react": "^1.3",
"phergie/phergie-irc-plugin-react-tableflip": "^1.0"
}
}
This is what is actually installed:
evenement/evenement v2.0.0 Événement is a very simple event dispatching library for PHP
monolog/monolog 1.17.1 Sends your logs to files, sockets, inboxes, databases and various web services
phergie/phergie-irc-client-react 2.3.0 IRC client library built on React
phergie/phergie-irc-connection 2.0.0 Data structure for containing information about an IRC client connection
phergie/phergie-irc-event 1.0.2 PHP data structure for IRC event information
phergie/phergie-irc-generator 1.7.0 Generator for messages conforming to the IRC protocol
phergie/phergie-irc-parser 2.1.0 Parser for messages conforming to the IRC protocol
psr/log 1.0.0 Common interface for logging libraries
react/cache v0.4.0 Async caching.
react/dns v0.4.1 Async DNS resolver.
react/event-loop v0.4.1 Event loop abstraction layer that libraries can use for evented I/O.
react/promise v2.2.1 A lightweight implementation of CommonJS Promises/A for PHP
react/socket v0.4.2 Library for building an evented socket server.
react/socket-client v0.4.4 Async connector to open TCP/IP and SSL/TLS based connections.
react/stream v0.4.3 Basic readable and writable stream interfaces that support piping.
##So where does my plugin code belong?
It looks like your plugin is requiring itself? Beyond that, the plugin
composer.json
file looks fine.For your local bot instance, this looks like a reasonable
composer.json
file for that, as you showed above:From the directory containing that
composer.json
file, you should be able to runcomposer install
and then run./vendor/bin/phergie config.php
from the same directory.