-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serialization of 'Closure' is not allowed #891
Comments
My guess: During creation this property is set on the Project model instance. The property contains the closure / callback set by |
I think you should ask that on spatie/laravel-sluggable, with that, the model is not serializable |
We have encountered the same issue. Within the past couple of days. We had no problems with this package, then all of a sudden we are seeing 'Serialization of Closure' errors at version 16.6.3. This has caused a MASSIVE issue in our business and has me working out of hours to resolve it. Rolling back to v13.5.1 fixed this issue. We do not have the spatie/laravel-sluggable package installed. So there is another cause of this bug, which was introduced in a recent version of the owen-it/laravel-auditing package. |
@andycarrot did you try #893 Also #884 (comment) |
I have released 13.6.4 where the queue feature is disabled by default (as it should have been, sorry). I expect avoiding the serialization for queue should mitigate the problem. If not, let me know and stick to v13.5.1 in production. |
Hi @parallels999 and @MortenDHansen, thanks for your respoonses. I will try setting queue = false. But I think i'll stick on 13.5.1 on prod until i know this has been safely resolved in a future release, to avoid this happening again. |
Good idea. Sorry for the inconvenience! |
Actual Behaviour
We audit a model
App\Models\Project
. The model has a slug columnprojects.slug
which is managed by the spatie/laravel-sluggable package. Since the latest update from 13.5.1 to 13.6.3 creating a new project (Project::create([...])
) will throw an error, see below. The user gets a 500 error message. The project is created. There is no audit entry.We figured out that the error occurs as soon as we define an
extraScope
for the slug feature, see scopes.Of course we can set the config
audit.queue.enable
tofalse
and then the error is gone, too.Expected Behaviour
We can create a project without error message. An audit entry is created and the slug is generated, respecting any extra scopes.
Steps to Reproduce
composer require owen-it/laravel-auditing
php artisan vendor:publish --provider "OwenIt\Auditing\AuditingServiceProvider" --tag="config"
php artisan vendor:publish --provider "OwenIt\Auditing\AuditingServiceProvider" --tag="migrations"
composer require spatie/laravel-sluggable
Project
with migration, two columnsprojects.name
andprojects.slug
extraScope
The text was updated successfully, but these errors were encountered: