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
Imagine two classes, both with typed properties and without default values.
First class has an array property of second classes.
Denormalizing into an object with object_to_populate, you could have a case when an array item is being instantiated by the serializer, because it could not be found in the object_to_populate.
In this case with deep_object_to_populate true it will try to read from that freshly instantiated object and fail because typed property is not initialized.
The same case is fixed with normalization: #40578#41615
Symfony version(s) affected
6.3.9
Description
Imagine two classes, both with typed properties and without default values.
First class has an array property of second classes.
Denormalizing into an object with object_to_populate, you could have a case when an array item is being instantiated by the serializer, because it could not be found in the object_to_populate.
In this case with deep_object_to_populate true it will try to read from that freshly instantiated object and fail because typed property is not initialized.
The same case is fixed with normalization: #40578 #41615
How to reproduce
Possible Solution
Make option
skip_uninitialized_values
work when denormalizing.Additional Context
Inspired from comment #40578 (comment)
The text was updated successfully, but these errors were encountered: