diff --git a/serializer/custom_normalizer.rst b/serializer/custom_normalizer.rst index 5b70acecdb5..7a2d48660ea 100644 --- a/serializer/custom_normalizer.rst +++ b/serializer/custom_normalizer.rst @@ -48,6 +48,15 @@ to customize the normalized data. To do that, leverage the ``ObjectNormalizer``: } } +.. deprecated:: 6.4 + + Injecting an ``ObjectNormalizer`` in your custom normalizer is deprecated + since Symfony 6.4. Implement the + :class:`Symfony\\Component\\Serializer\\Normalizer\\NormalizerAwareInterface` + and use the the + :class:`Symfony\\Component\\Serializer\\Normalizer\\NormalizerAwareTrait` instead + to inject the ``$normalizer`` property. + Registering it in your Application ----------------------------------