[Serializer] Fix serialization of method with same name than property#62838
Merged
nicolas-grekas merged 1 commit intoJan 6, 2026
Merged
Conversation
61010e4 to
da7e290
Compare
nicolas-grekas
approved these changes
Dec 23, 2025
Member
nicolas-grekas
left a comment
There was a problem hiding this comment.
Works for me as a bug fix.
Contributor
Author
Nice, I'll update #62779 after this merge then |
Member
|
Rebase needed after #62886 🙏 |
da7e290 to
b2cba3c
Compare
Contributor
Author
Rebased ! I think the failure are unrelated |
Member
|
Thank you @VincentLanglet. |
nicolas-grekas
added a commit
that referenced
this pull request
Jan 6, 2026
…ethods (nicolas-grekas) This PR was merged into the 6.4 branch. Discussion ---------- [Serializer] Fix #[Ignore] on same-name properties <-> methods | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | - | License | MIT Follows #62838 We should always set the ignore flag when the `#[Ignore]` attribute is present, regardless of the `$accessorOrMutator` or `$hasProperty` flags. Commits ------- 9895694 [Serializer] Fix #[Ignore] on same-name properties <-> methods
This was referenced Jan 24, 2026
Merged
Merged
Merged
Merged
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.
Currently the DeduplicateStamp has two issues with Symfony Serializer (cf #60659)
onlyDeduplicateInQueueis not serialized at allWhile the first issue is easily solved, the second one does not seems that easy.
Related to discussion #62779 (comment)
The property
onlyDeduplicateInQueueis private and the related "getter" is calledonlyDeduplicateInQueue()too, which means it's not serialized by the ObjectNormalizer since it only supportget/is/can/hasmethods.This PR allows
I don't know if
canto the accessor prefixes recognized by theAttributeLoader#61023If merged in 6.4 this could be used for the fix #62779 (or we use a workaround of having two methods in DeduplicateStamp until 8.1)
cc @nicolas-grekas