Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

UnwrappingDenormalizer is badly designed #49645

Closed
@nicolas-grekas

Description

@nicolas-grekas

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp