Replies: 1 comment
-
Added a PR for this: #735 |
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
-
So I have this data object:
When this is dispatched in a job, there's
__sleep
that serializes all of the properties including the Lazy, which have Closures in its body. This causesException: Serialization of 'Closure' is not allowed in /.../vendor/laravel/framework/src/Illuminate/Queue/Queue.php:160
I tried to convert it to a serializable format by doing
Which kinda works if I have all the Lazy attributes marked as
|null
:But when I don't have the nullable types there, I get
Is there a way to just serialize the job so I can continue using the Data object instead of passing the Model directly into the Job?
Thanks for your time <3
Beta Was this translation helpful? Give feedback.
All reactions