Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Serializer] Fixed serialize and denormalize return types #39337

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

Merged

Conversation

vudaltsov
Copy link
Contributor

@vudaltsov vudaltsov commented Dec 5, 2020

Q A
Branch? 5.1
Bug fix? yes
New feature? no
Deprecations? no
Tickets no
License MIT
Doc PR no

Since #35235 SerializerInterface::deserialize() and DenormalizerInterface::denormalize() return types are no longer correct.

I suggest using mixed to allow custom denormalizers to denormalize to any type. For instance, I might add ClosureDenormalizer or NullDenormalizer or ResourceDenormalizer, technically there are no limits.

@vudaltsov vudaltsov requested a review from dunglas as a code owner December 5, 2020 18:40
@carsonbot carsonbot added this to the 5.1 milestone Dec 5, 2020
@vudaltsov vudaltsov changed the title Fixed serialize and denormalize return types [Serializer] Fixed serialize and denormalize return types Dec 5, 2020
Copy link
Member

@dunglas dunglas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree to remove this arbitrary limitation.

@fabpot fabpot force-pushed the fix-serialize-denormalize-return-types branch from 38655da to 67277e5 Compare December 8, 2020 06:29
@fabpot
Copy link
Member

fabpot commented Dec 8, 2020

Thank you @vudaltsov.

@fabpot fabpot merged commit 7652685 into symfony:5.1 Dec 8, 2020
@vudaltsov vudaltsov deleted the fix-serialize-denormalize-return-types branch December 8, 2020 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.