Event listener should be queued and ran in background without errors.
There is an error when you run event:
ReflectionException: Class Illuminate\Events\CallQueuedHandler does not exist in /home/vagrant/code/*/vendor/laravel/framework/src/Illuminate/Container/Container.php:752
Configure environment to use queue driver like beanstalkd.
Create event class like in Laravel documentation.
https://laravel.com/docs/5.5/events#defining-events
Create listener class like in Laravel documentation.
https://laravel.com/docs/5.5/events#queued-event-listeners
Register listener in plugin boot() method or in init.php file.
Fire event in your code.
422
This is a complex case.
In order to aid in our understanding of the problem, please submit a Pull Request to the test plugin for investigation that demonstrates the issue. Don't forget to include step by step instructions how how to replicate it _using the test plugin_.
It's not a complex case, it lacks detail. Please provide the full stack trace and explicitly the code you are running.
I am also experiencing this same issue on build 428.
// Fire event to be queued
Event::queue('form.submitted', new FormSubmitted($this->form, $request));
<?php
use Illuminate\Contracts\Queue\ShouldQueue;
class FormSubmissionHandler implements ShouldQueue
{
public function handle(FormSubmitted $event)
{
// do some processing here
}
}
@computerfr33k please post a full stack trace.
When using Event::queue: https://pastebin.com/LuHNysWj
When using Event::fire: https://pastebin.com/hzd30ePZ
@daftspunk any input on the above?
This still seems to be an issue
@xtremetom please post detailed replication instructions
@daftspunk I am experiencing the exact same behaviour when using Event::queue as @computerfr33k
@datune please provide as many details as possible.
Faced same issue. Quick search by "CallQueuedHandler" gave the following result:

So error "Class Illuminate\Events\CallQueuedHandler does not exist" appears because it really doesn't exist. But there is October\Rain\Events\CallQueuedHandler.
So after I replaced lines 'Illuminate\Events\CallQueuedHandler@call' in Dispatcher class by 'October\Rain\Events\CallQueuedHandler@call' - the issue disappeared
@vdomah could you submit that fix in a PR?
@LukeTowers yes, doing
@LukeTowers @vdomah Hey, I took the liberty to create the PR with the solution and a test case that covers this issue. Hope you don't mind. :)
@plehatron thanks, much appreciated!
Fixed by https://github.com/octobercms/library/commit/e4a0b2150a7f08d43a88bcec38e367b0d0cb9d13. Thanks @plehatron!
Thanks @plehatron!
Most helpful comment
Faced same issue. Quick search by "CallQueuedHandler" gave the following result:

So error "Class Illuminate\Events\CallQueuedHandler does not exist" appears because it really doesn't exist. But there is October\Rain\Events\CallQueuedHandler.
So after I replaced lines 'Illuminate\Events\CallQueuedHandler@call' in Dispatcher class by 'October\Rain\Events\CallQueuedHandler@call' - the issue disappeared