Vinelab / minion

A Simplified Client for WAMP v2 (Web Application Messaging Protocol) with command line support - PHP WebSocket Made Easy
MIT License
126 stars 16 forks source link

Invalid Provider Exception #16

Open leo-combes opened 7 years ago

leo-combes commented 7 years ago

Hello! First of all.. I'm are a composer noob, so I'm not much familiarized with him.

I are trying to test the "ChatProvider" example in front page, with no luck...

I do a folder "minion" and inside put a composer.json file with "vinelab/minion": "*" then I ran "composer update" and everything installs. I create "start.php" and "ChatProvider.php" as tutorial says and I put in your place:

├── composer.json
├── composer.lock
├── composer.phar
├── src
│   └── ChatProvider.php
├── start.php
└── vendor
    ├── autoload.php
    ├── bin
    ├── cboden
    ├── composer
    ├── doctrine
    ├── evenement
    ├── guzzle
    ├── illuminate
    ├── leo
    ├── nesbot
    ├── paragonie
    ├── psr
    ├── ratchet
    ├── react
    ├── symfony
    ├── vinelab
    └── voryx

I tried start with php -f start.php and I get a error:

PHP Fatal error: Uncaught exception 'Vinelab\Minion\InvalidProviderException' with message 'Provider ChatProvider must be an instance of \Vinelab\Minion\Provider' in /var/www/minion/vendor/vinelab/minion/src/Vinelab/Minion/Minion.php:43

What may be missing? I'm not are using Laravel or other stuff... Thanks in advance.

NeoVance commented 6 years ago

ChatProvider is either not being imported, or is not extending the \Vinelab\Minion\Provider class.