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:
class MyListener implements ShouldQueue
{
public function handle(): void
{
}
}
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.
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.