-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Serializer] Prevent that bad Ignore method annotations lead to incorrect results #46947
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
Conversation
It looks like you unchecked the "Allow edits from maintainer" box. That is fine, but please note that if you have multiple commits, you'll need to squash your commits into one before this can be merged. Or, you can check the "Allow edits from maintainers" box and the maintainer can squash for you. Cheers! Carsonbot |
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.
LGTM
8000 div>
Thanks for the PR! |
d624202
to
59204a3
Compare
Hey @chalasr, the bug is in fact already present in 5.4. I have now rebased to 5.4. |
@astepin Alright, by "other config formats" I was thinking of yaml and xml. After a quick look to these loaders it turns out they have no single validation rule regarding the accessor/mutator, so I'd say we can ignore them and go ahead here. |
Thank you @astepin. And congratz on your first contrib! |
fix #45016
By attaching the Ignore serializer annotation to a method that is not a set/get/has/is method, the property that was read before the method was marked as ignored.
I have tweaked the behavior here so that it matches the other annotations.
However, the change could now cause exceptions in older projects if they already have this bug built in.
From my point of view, however, this is justifiable, because at the moment data may not be output correctly.