Skip to content
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

Bugfix: Unable to serialize multi-type collections #103

Merged
merged 6 commits into from
Mar 31, 2023

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
composer.json Outdated Show resolved Hide resolved
@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