Skip to content

Conversation

@Smoggert
Copy link
Contributor

@Smoggert Smoggert commented Sep 26, 2022

This fix can be merged once the next framework version goes live.
Currently the fix in the laravel framework is on 9.x (upcoming 9.32.0)
laravel/framework#44272

This fixes an issue with serializing collections with multiple different models.
This issue occurs when queueing an eloquent collection
( and in some less important cases like livewire abusing the serialization logic during mounting of a component. )

Update HasParent.php to fix collection serialization.

Currently Parental creates unserializable Eloquent collections resulting in an error when pushing the colleciton to queue

Queueing collections with multiple model types is not supported.

I merged a framework request to create this callback on the model to circumvent the issue.
laravel/framework#44272

This should fix the serialization error.
Changed requirement to framework version v9.32.
@Smoggert Smoggert changed the title Bugfix: Unable to rerialize Bugfix: Unable to serialize multi-type collections Sep 26, 2022
Invalid json
@driftingly driftingly merged commit 0029f66 into tighten:master Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants