Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update custom_normalizer.rst #17911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

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