-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Serializer] #[Ignore]
on method ignores properties with same name
#46918
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
Comments
#[Ignore]
on method ignores properties with same name
I'm jealous :) ping @dunglas |
maybe this can be addressed together with #46592 |
Indeed. Let's close this as duplicate |
Looks like chosen solution for #46592 won't work here, so I need to reopen |
Besides |
Yeah of course, here this looks to be a design issue of sf serializer, that there is no namespacing that would differentiate if annotation/attribute/whatever is on attribute, method or wherever else. |
Hey, thanks for your report! |
Friendly ping? Should this still be open? I will close if I don't hear anything. |
This issue is still relevant |
Hey, thanks for your report! |
This issue is still relevant |
Hey, thanks for your report! |
Just a quick reminder to make a comment on this. If I don't hear anything I'll close this. |
Hey, I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen! |
I agree on this bug, specially when you have class with a property and a isPropertyName method Workaround is to rename the isPropertyName to something else, but code is less readable. To me #Ignore on method should not apply on public attribute class IgnoreDummy
} |
Symfony version(s) affected
6.2.2
Description
Serializer does not differentiate between properties and methods when applying #[Ignore] attributes/annotations
How to reproduce
Possible Solution
Serializer metadata should group methods and public properties to separate "buckets"
Additional Context
No response
The text was updated successfully, but these errors were encountered: