Skip to content

Conversation

Pixelshaped
Copy link

Autowiring ObjectNormalizer has been deprecated since Symfony 6.1. Autowiring NormalizerInterface leads to a circular reference. The new way of doing things, as explained in:
https://symfonycasts.com/screencast/api-platform-security/normalizer-aware#avoiding-recursion-with-a-context-flan Is to implement a NormalizerAwareInterface and to use the NormalizerAwareTrait.

Autowiring ObjectNormalizer has been deprecated since Symfony 6.1.
Autowiring NormalizerInterface leads to a circular reference.
The new way of doing things, as explained in:
https://symfonycasts.com/screencast/api-platform-security/normalizer-aware#avoiding-recursion-with-a-context-flan
Is to implement a NormalizerAwareInterface and to use the NormalizerAwareTrait.
Copy link
Contributor

@ndench ndench left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there maybe be a note stating that injecting the normalizer in the constructor was deprecated in 6.1?

@ndench
Copy link
Contributor

ndench commented Jun 11, 2023

Actually, this seems to duplicate #16826

@javiereguiluz
Copy link
Member

Closing as a duplicate of #16826 which was fixed in #19532. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants