Exception when adding ShouldQueue Listener to Event #1860
Unanswered
NiroDeveloper
asked this question in
Q&A
Replies: 1 comment
-
I'm open to a PR that will fix this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If we add a ShouldQueue Listener to a event like BackupWasSuccessful it will throw a exception.
This is because laravel tries to serialize the Event, but the object contains a BackupDestination and that a Filesystem that can not be serialized.
Listener example:
In the service provider:
Event::listen(BackupWasSuccessful::class, MyListener::class);
It will throw a exception like this:
ERROR: Serialization of 'finfo' is not allowed {"exception":{"class":"Exception","file":"/var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Queue.php","line":160,"trace":"#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Queue.php(160): serialize()
I testet this with the local and sftp filesystem driver.
Beta Was this translation helpful? Give feedback.
All reactions