[DoctrineBridge] Do not ignore null IDs in EntityValueResolver#47242
Merged
nicolas-grekas merged 1 commit intosymfony:6.2symfony/symfony:6.2from Aug 18, 2022
Merged
[DoctrineBridge] Do not ignore null IDs in EntityValueResolver#47242nicolas-grekas merged 1 commit intosymfony:6.2symfony/symfony:6.2from
nicolas-grekas merged 1 commit intosymfony:6.2symfony/symfony:6.2from
Conversation
33860b9 to
4ca5586
Compare
4ca5586 to
a6bba15
Compare
nicolas-grekas
approved these changes
Aug 18, 2022
chalasr
approved these changes
Aug 18, 2022
a6bba15 to
db05d4c
Compare
Member
|
Thank you @MatTheCat. |
|
You lot are legends, thank you. Any chance to pop this one in 6.1 as well? |
Contributor
Author
|
@janklan the entity value resolver was introduced in 6.2 😅 @nicolas-grekas would it make sense to backport this to the framework extra bundle? |
|
Ah, right, we're leaving SensioFrameworkExtraBundle. Well, I hope @nicolas-grekas will say yes, but since this behaviour has been there for possibly years and nobody seemed to be bothered, maybe it's not worth your time. |
Member
|
As we’re going to deprecate the bundle and because it would be a BC break, we won’t backport this change to the bundle. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
EntityValueResolverfirst try to fetch an entity by its ID but handle null and non-existent IDs the same.If a
nullID is present, it feels weird to ignore it and try matching an entity using other request attributes. Better returnnullin this case.