-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PropertyAccess] Class property ignored when unrelated methods are marked as ignored instead #45016
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
astepin
added a commit
to CloudPlayDev/symfony
that referenced
this issue
Jul 14, 2022
astepin
added a commit
to CloudPlayDev/symfony
that referenced
this issue
Jul 14, 2022
astepin
added a commit
to CloudPlayDev/symfony
that referenced
this issue
Jul 15, 2022
astepin
added a commit
to CloudPlayDev/symfony
that referenced
this issue
Jul 15, 2022
astepin
added a commit
to CloudPlayDev/symfony
that referenced
this issue
Jul 15, 2022
chalasr
added a commit
that referenced
this issue
Jul 15, 2022
…ad to incorrect results (astepin) This PR was merged into the 5.4 branch. Discussion ---------- [Serializer] Prevent that bad Ignore method annotations lead to incorrect results fix #45016 | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #45016 | License | MIT | Doc PR | na 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. Commits ------- edb1038 Prevent that bad Ignore method annotations lead to incorrect results
symfony-splitter
pushed a commit
to symfony/serializer
that referenced
this issue
Jul 15, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Symfony version(s) affected
6.*
Haven't checked any older versions.
Description
Given I have a class like:
Now when a child class is (de)serialized, the
id
property is marked as ignored and not included in the output. The linked reproducer should give some more details.This could be a fairly critical bug in some cases, because if the serializer is user for DB entities, values can be lost.
How to reproduce
https://github.com/Jeroeny/reproduce/tree/annotate
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: