You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When ALLOW_EXTRA_ATTRIBUTES are turned off, denormalizing union types will throw an error, if the first type of the union contains an extra attribute, instead checking, if the second (or the other types) can be resolved without an error.
…nion types when ALLOW_EXTRA_ATTRIBUTES=false (T-bond)
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Serializer] Try all possible denormalization route with union types when ALLOW_EXTRA_ATTRIBUTES=false
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #45860
| License | MIT
| Doc PR | -
I found a similar bug, (I think this is a bug, but it is possible, it is an intended behaviour) to my previous report.
Commits
-------
bd623b9 [Serializer] Try all possible denormalization route with union types when ALLOW_EXTRA_ATTRIBUTES=false
Symfony version(s) affected
4.4.39, 6.0.6
Description
When
ALLOW_EXTRA_ATTRIBUTES
are turned off, denormalizing union types will throw an error, if the first type of the union contains an extra attribute, instead checking, if the second (or the other types) can be resolved without an error.How to reproduce
serializer
component needed:PHPUnit:
Possible Solution
Checking the other types, if they can be denormalized without extra attributes, before throwing an error. (Similarly as in #45838)
Additional Context
No response
The text was updated successfully, but these errors were encountered: