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
Description
The documentation for ObjectNormalizer states that "It supports calling the constructor during the denormalization process." but that is not true when one of the constructor arguments is an array of objects. Currently (since #19649), is is only possible to denormalize an "array of objects" property if that property has a setter method or is public.
Description
The documentation for
ObjectNormalizer
states that "It supports calling the constructor during the denormalization process." but that is not true when one of the constructor arguments is an array of objects. Currently (since #19649), is is only possible to denormalize an "array of objects" property if that property has a setter method or is public.Example
Executing this script from a project root will print:
The expected result is:
That expected result can be obtained by replacing the constructor of
Pack
with a setter for$items
:The text was updated successfully, but these errors were encountered: