Skip to content

[9.x] Fix empty collection class serialization#43758

Merged
taylorotwell merged 4 commits into
9.xfrom
fix-empty-collection-class
Aug 18, 2022
Merged

[9.x] Fix empty collection class serialization#43758
taylorotwell merged 4 commits into
9.xfrom
fix-empty-collection-class

Conversation

@driesvints

Copy link
Copy Markdown
Member

This fixes an issue where restoring a custom Eloquent collection wouldn't be of the same type. We should save the class type in the ModelIdentifier class to achieve this.

Fixes #43732

@driesvints driesvints changed the title Fix empty collection class serialization [9.x] Fix empty collection class serialization Aug 18, 2022
@driesvints driesvints marked this pull request as draft August 18, 2022 12:47
@driesvints driesvints marked this pull request as ready for review August 18, 2022 12:52
Comment thread src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php
@taylorotwell taylorotwell merged commit da2bcfb into 9.x Aug 18, 2022
@taylorotwell taylorotwell deleted the fix-empty-collection-class branch August 18, 2022 14:18
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.

Serialization fails for typed custom Eloquent Collections that are empty

3 participants