Comments (11)
What version of Laravel are you using ?
from minion.
Ah, I see from your structure it seems to be Laravel 4. can you please use the following in your composer.json
:
{
"vinelab/minion": "1.2"
}
then perform a composer update
and try again.
from minion.
NO, its not work, :(,
I am using modular structure in Laravel
, Can it affect this?
I am using creolab/laravel-modules for Modularization in laravel
.
from minion.
It shouldn't matter what structure you use, as long as your provider is extending Vinelab\Minion\Provider
it should work.
If you are running minion using artisan make sure you tell minion about your ChatProvider
class with the register
option:
php artisan minion:run --register="ChatProvider"
from minion.
I tried this also but it still not working.
from minion.
seems like Minion is detecting the wrong ChatProvider
class
from minion.
@arjundas I replied to your stackoverflow. @Mulkave is right, it is detecting a different ChatProvider class. Make sure Laravel is loading providers folder or you can't just use ChatProvider directly. You need to specify proper namespacing. PSR-0 standard.
namespace Providers\ChatProvider;
then you register ChatProvider like this --register"Providers\ChatProvider"
you need to specify composer what to autoload.
Minion and Laravel are loading differently. That's why you need to specify a namespace.
from minion.
Just got the same error.
I am using Laravel 4. Here is my folder configuration :
app
+ Arato
+ push
- AlertProvider.php
+ commands
+ config
+ controllers
in my composer.json :
"autoload": {
"classmap": [
...
"app/Arato"
]
}
the minion.php :
<?php
return [
/*
|--------------------------------------------------------------------------
| Router Realm
|--------------------------------------------------------------------------
|
| The realm that the router should use.
|
*/
'realm' => 'minion',
/*
|--------------------------------------------------------------------------
| Router Host
|--------------------------------------------------------------------------
|
| The IP or hostname that the router should run under.
|
*/
'host' => '127.0.0.1',
/*
|--------------------------------------------------------------------------
| Router Port
|--------------------------------------------------------------------------
|
| The port that should be used by the router.
|
*/
'port' => 9090,
/*
|--------------------------------------------------------------------------
| Auto-registered Providers
|--------------------------------------------------------------------------
|
| The providers listed here will be automatically registered on the
| session start of the router, in return their role is to register RPCs,
| subscribe and publish to topics and pretty much whatever an Internal Client does.
|
*/
'providers' => [
"Arato\push\AlertProvider"
],
'debug' => true,
];
the AlertProvider.php file :
<?php
namespace Arato\push;
use Vinelab\Minion\Provider;
class AlertProvider extends Provider
{
public function boot()
{
$this->publish('i.am.here', ['name' => 'mr.minion']);
}
}
I do not know why the namespace is incorrect.
Best regards.
from minion.
The problem is a namespace problem, you are classmapping in composer instead of autoloading with PSR, try:
"autoload": {
" ...",
"psr-0": {
"Arato": "app/"
}
}
And as a standard convention, try uppercasing the push
folder, namespace and provider such as:
namespace Arato\Push;
from minion.
Thank you, I think it should be fixed now.
However I still have a problem, when I run php artisan minion:run
with debug to true, I get the following :
2015-03-16T21:16:44.3259470 info [Thruway\Transport\PawlTransportProvider 7393] Starting Transport
2015-03-16T21:16:44.3288680 info [Thruway\Transport\PawlTransportProvider 7393] Pawl has connected
2015-03-16T21:16:44.3311980 debug [Thruway\Transport\PawlTransportProvider 7393] Received: [2,356050420,{"roles":{"broker":{"features":{"publisher_exclusion":true,"subscriber_blackwhite_listing":true,"subscription_meta_api":true,"pattern_based_subscription":true,"publisher_identification":true}},"dealer":{"features":{"progressive_call_results":true,"shared_registration":true,"registration_meta_api":true,"pattern_based_registration":true,"caller_identification":true}}},"authid":"oJp4lmZNL5TWfnh2ADMzOO7K","authrole":"anonymous","authmethod":"anonymous"}]
2015-03-16T21:16:44.3313030 debug [Vinelab\Minion\Client 7393] Client onMessage: [Thruway\Message\WelcomeMessage]
2015-03-16T21:16:44.3313290 info [Vinelab\Minion\Client 7393] We have been welcomed...
2015-03-16T21:16:44.3327700 info [Thruway\Transport\PawlTransportProvider 7393] Pawl has closed
2015-03-16T21:16:45.8362700 info [Thruway\Transport\PawlTransportProvider 7393] Starting Transport
2015-03-16T21:16:45.8389650 info [Thruway\Transport\PawlTransportProvider 7393] Pawl has connected
2015-03-16T21:16:45.8412010 debug [Thruway\Transport\PawlTransportProvider 7393] Received: [2,1628429246,{"roles":{"broker":{"features":{"publisher_exclusion":true,"subscriber_blackwhite_listing":true,"subscription_meta_api":true,"pattern_based_subscription":true,"publisher_identification":true}},"dealer":{"features":{"progressive_call_results":true,"shared_registration":true,"registration_meta_api":true,"pattern_based_registration":true,"caller_identification":true}}},"authid":"o67hOrx3oruFbO62ecd1o567","authrole":"anonymous","authmethod":"anonymous"}]
2015-03-16T21:16:45.8413230 debug [Vinelab\Minion\Client 7393] Client onMessage: [Thruway\Message\WelcomeMessage]
2015-03-16T21:16:45.8413510 info [Vinelab\Minion\Client 7393] We have been welcomed...
2015-03-16T21:16:45.8430050 info [Thruway\Transport\PawlTransportProvider 7393] Pawl has closed
and it is looping.
EDIT : seems this behavior comes from $this->publish('i.am.here', ['name' => 'mr.minion']);
EDIT 2 :
it should be
$this->publish('i.am.here', [], ['name' => 'mr.minion']);
from minion.
@prbaron exactly! It is publish($topic, $args, $kwArgs)
where $args
is an array of arguments and $kwArgs
is the key-value array. Glad you had it resolved.
from minion.
Related Issues (14)
- Connection issue with autobahn.js HOT 9
- Could you allow to pass in the React Loop HOT 3
- How to send a custom message? HOT 1
- Invalid Provider Exception HOT 1
- laravel 5.4 call to member function call() on null HOT 2
- Publishing from backend HOT 1
- Authentication HOT 3
- Push support HOT 5
- Update Thruway dependency to 0.3 HOT 1
- Crossbar.io HOT 2
- i can't understand your document! HOT 2
- Fatal error: Call to a member function call() on null HOT 6
- How to publish from a controller HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minion.