laravel-workflow: Event listeners defined in EventServiceProvider failing

I have the following in EventServiceProvider:

class EventServiceProvider extends ServiceProvider { protected $listen = [ 'workflow.smsNotificationIncoming.transition.toAccepted' => [IncomingListener::class], ];

When transition is applied, fails with:

{ “message”: “Serialization of ‘Closure’ is not allowed”, “exception”: “Exception”,

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 22 (10 by maintainers)

Most upvoted comments

Hi, I’m happy to report that serializing is fine if event listener implements ShouldQueue interface then execution is queued properly.