Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[Serializer] Fix deserializing object collection properties#51369

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@X-Coder264
Copy link
Contributor

@X-Coder264X-Coder264 commentedAug 12, 2023
edited
Loading

QA
Branch?6.3
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#51261
LicenseMIT
Doc PR-

On Symfony <= 6.2 serializer versions thesupportsDenormalization was always called in\Symfony\Component\Serializer\Serializer::getDenormalizer.

When thegetSupportedTypes logic was introduced for Symfony 6.3 serializer someif statement conditions were introduced and if they aretrue thesupportsDenormalization logic is not called at all anymore. Those conditions currently prevent a legit use-case that worked prior to 6.3 from calling thesupportsDenormalization method - the case being when the denormalizer is supposed to denormalize a collection/array of objects. This use-case still works even on the 6.3 serializer as long as the denormalizer does not implement the newgetSupportedTypes method, but that is triggering a deprecation.

This PR aims to fix that so that denormalizing an array of objects still works even when using the newgetSupportedTypes method in a denormalizer.

cc@tucksaun@nicolas-grekas

alexlongshaw reacted with hooray emoji
Copy link
Contributor

@andersmateuszandersmateusz left a comment

Choose a reason for hiding this comment

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

Tested this on my local environment. Seems legit.

@X-Coder264X-Coder264force-pushed thefix-deserializing-object-collection-properties branch from7ad9e6e to32dc134CompareAugust 22, 2023 18:29
@nicolas-grekas
Copy link
Member

Thank you@X-Coder264.

X-Coder264 reacted with thumbs up emoji

@nicolas-grekasnicolas-grekas merged commit469f1cc intosymfony:6.3Aug 23, 2023
@X-Coder264X-Coder264 deleted the fix-deserializing-object-collection-properties branchAugust 23, 2023 10:15
@fabpotfabpot mentioned this pull requestAug 26, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@mtarldmtarldmtarld approved these changes

@dunglasdunglasAwaiting requested review from dunglasdunglas is a code owner

+1 more reviewer

@andersmateuszandersmateuszandersmateusz approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

6.3

Development

Successfully merging this pull request may close these issues.

5 participants

@X-Coder264@nicolas-grekas@mtarld@andersmateusz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp