Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Serializer] Fix discriminator map not working with AbstractNormalizer::OBJECT_TO_POPULATE #50480

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

HypeMC
Copy link
Contributor

@HypeMC HypeMC commented May 30, 2023

Q A
Branch? 6.2
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #50472
License MIT
Doc PR -

Ensures that the mapped class is taken from AbstractNormalizer::OBJECT_TO_POPULATE if it's set.

@soyuka
Copy link
Contributor

soyuka commented May 31, 2023

👍 Thanks @HypeMC

@nicolas-grekas
Copy link
Member

Thank you @HypeMC.

@nicolas-grekas nicolas-grekas merged commit e901262 into symfony:6.2 May 31, 2023
@HypeMC HypeMC deleted the fix-discriminator-with-object-to-populate branch May 31, 2023 10:08
@HypeMC
Copy link
Contributor Author

HypeMC commented May 31, 2023

@nicolas-grekas It just occurred to me that this problem exists on v5.4 as well, should I open a new PR and target that branch?

@nicolas-grekas
Copy link
Member

yes please

nicolas-grekas added a commit that referenced this pull request May 31, 2023
…actNormalizer::OBJECT_TO_POPULATE` (HypeMC)

This PR was merged into the 5.4 branch.

Discussion
----------

[Serializer] Fix discriminator map not working with `AbstractNormalizer::OBJECT_TO_POPULATE`

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

Followup / backport of #50480 since it should've originally targeted 5.4.

The test is the same as in the previous PR, when merging upstream the changes in `instantiateObject()` should be discarded.

Commits
-------

ce08608 [Serializer] Fix discriminator map not working with `AbstractNormalizer::OBJECT_TO_POPULATE`
This was referenced Jun 26, 2023
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.

4 participants