Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Serializer] addcan to the accessor prefixes recognized by theAttributeLoader#61023
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This comment has been minimized.
This comment has been minimized.
can to the accessor prefixes recognized by the AttributeLoadercan to the accessor prefixes recognized by the AttributeLoadercan to the accessor prefixes recognized by the AttributeLoadercan to the accessor prefixes recognized by the AttributeLoader| #[Ignore] | ||
| publicfunctiongetSomethingElse():int | ||
| { | ||
| return42; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This additional test case seems not related to your PR topic. Is there a use for it that I've missed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I wanted to check the behaviour forgetX and make sure it keeps working after my change.
If you want me to remove it, I can do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
As it seems already covered bygetIgnored2, I think you can remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
ignored2 is itself a property, I wanted to make sure it also works if its just the accessor, without any obvious property backing it. But I'll remove it.
nicolas-grekas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can you please add a line to the changelog file of the component?
themasch commentedJul 7, 2025
@nicolas-grekas like this? |
Uh oh!
There was an error while loading.Please reload this page.
2003146 to2d7a3fbComparethemasch commentedJul 7, 2025
Would it make sense to backport this to 7.3, 7.2 and 6.4, or would that be to big of a BC break? |
stof commentedJul 7, 2025
New features are never backported in patch versions. |
themasch commentedJul 7, 2025
Okay, so this counts as a new feature, not a bug fix? Good to know, so we'll need to wait for 7.4 to remove our work around! Thanks! |
can to the accessor prefixes recognized by the AttributeLoadercan to the accessor prefixes recognized by theAttributeLoader696ecad tofb1da0bComparenicolas-grekas commentedJul 15, 2025
Thank you@themasch. |
cabe552 intosymfony:7.4Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
The ObjectNormalizer already recognizes
canXas an accessor and "generates" a property for that, the AttributeLoader does not, so #[Ignore] attributes oncanXare ignored, the return value is encoded in the normalized data.We just add the
canprefix ot the list of accepted accessor prefixes, so the AttributeLoader now also recognized these.I adapted a test thatseemd to me to fit the best. If you'd prefer a dedicated test for that, I can do that, too.