8000 [Serializer] regression with attribute serialization · Issue #58689 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Serializer] regression with attribute serialization #58689
Open
@oleg-andreyev

Description

@oleg-andreyev

Symfony version(s) affected

6.4.7

Description

Similar as #54983

But $attribute = 'segments[Default]'

Suspect #52917

In 6.4.6 ObjectObjectNormalizer::isAllowedAttribute did not exist and we were relying on AbstractNormalizer::isAllowedAttribute and PropertyAccess component can easly write segments[Default] into $segments field as ['Default' => '<value>']

In 6.4.7 ObjectObjectNormalizer::isAllowedAttribute and now it cannot detect that $segments is writeable.

How to reproduce

https://github.com/oleg-andreyev/bug_app/blob/issue-58689/tests/BugTest.php

Possible Solution

Similar to #57187 but instead of "adding" yet another condition,
looks like ObjectNormalizer::$propertyInfoExtractor is using ReflectionExtractor by default thus does not take into account PropertyAccessor information.

Additional Context

No response

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

      0