-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Serializer] Problem when serializing/deserializing empty arrays in xml #43193
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
Labels
Comments
Can you create a small example application that allows to reproduce your issue? |
Hello @xabbuh and thanks for your answer here is a reproducer https://github.com/nikophil/serializer_error just run |
This was referenced Sep 27, 2021
Thanks for tackling that @alexandre-daubois |
fabpot
added a commit
that referenced
this issue
Sep 29, 2021
…4.4) (alexandre-daubois) This PR was merged into the 4.4 branch. Discussion ---------- [Serializer] Fix denormalizing XML array with empty body (4.4) This happens for example with XML empty tags denormalizing to an object array attribute. | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #43193 on Symfony 4.4 | License | MIT | Doc PR | _NA_ Not sure how to deal with versions differences as they differ just a little bit. Anyway, here's the fix for 4.4 and you can find the fix for 5.x on #43204 😄 Commits ------- d6b7e2d [Serializer] Fix denormalizing of array with empty body
fabpot
added a commit
that referenced
this issue
Sep 29, 2021
…5.x) (alexandre-daubois) This PR was merged into the 5.3 branch. Discussion ---------- [Serializer] Fix denormalizing XML array with empty body (5.x) This happens for example with XML empty tags denormalizing to an object array attribute. | Q | A | ------------- | --- | Branch? | 5.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #43193 on Symfony 5.x | License | MIT | Doc PR | _NA_ Fix for 4.4 can be found in #43205 Commits ------- d94b7c1 [Serializer] Fix denormalizing of array with empty body
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Symfony version(s) affected: all? actually testing on
5.3.4
Description
When serializing an object with an empty array in xml and then deserializing this array into the same class, I encounter an error.
How to reproduce
(NB: the error is not due to the anonymous class)
The text was updated successfully, but these errors were encountered: