Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
Description
In#31390 we introducedUnwrappingDenormalizer
, which can extract a nested object without creating unnecessary model class that we don't really need.
The design of this denormalizer looks broken to me: it implementsSerializerAwareInterface
but calls$this->serializer->denormalize()
. This works because our implementation ofSerializer
implements bothSerializerInterface
andDenormalizerInterface
but this is still broken, from a design pov.
Another thing I'm wondering: because it works as a denormalizer, the serializer will callsupportsDenormalization()
at each iteration. Is this legit or isn't this denormalizer supposed to work only at the root level? While I'm sure that we could construct use cases where this can be leveraged, the drawback of this behavior is a potential perf cost.
WDYT?
/cc@nonanerz FYI