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

Symfony\Component\Serializer\Normalizer\PropertyNormalizer is unable to construct object without properties #46280

Open
@olsavmic

Description

@olsavmic

Description

Symfony\Component\Serializer\Normalize\PropertyNormalizer is unable to construct object without any properties due to the check inPropertyNormalizer::supportsNormalization.

I don't see any reason to enforce this except for preventing programmers' errors, especially since the ObjectNormalizer does not impose such restrictions.

I can see legit use-cases in places like message queues where all required information is present in the message header and hence the body can be empty.

I'd suggest making this restriction in PropertyNormalizer optional as it removing it entirely could result in backward-incompatible change for very specific configurations (eg. someone might want to fallback to GetSetMethodNormalizer in case PropertyNormalizer fails)


(Similar situation applies toSymfony\Component\Serializer\Normalize\GetSetMethodNormalizer)

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