Skip to content

Typed property Symfony\Component\Serializer\Normalizer\AbstractNormalizer::$serializer must not be accessed before initialization #54417

@pnxzadrot

Description

@pnxzadrot

Symfony version(s) affected

7.0.3

Description

Then I use class GetSetMethodNormalizer or ObjectNormalizer method normalize for get array I catch Typed property Symfony\Component\Serializer\Normalizer\AbstractNormalizer::$serializer must not be accessed before initialization problem. Maybe I need put something in Normalizer construct?

How to reproduce

$normalizer = new ObjectNormalizer();
$data = $normalizer->normalize($entity);

$this->normalizer = new GetSetMethodNormalizer();
$data = $ $this->normalizer->normalize($entity);

Possible Solution

No response

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