diff --git a/serializer/custom_normalizer.rst b/serializer/custom_normalizer.rst index 5b70acecdb5..f3c099e6466 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.1 + + Injecting an ``ObjectNormalizer`` in your custom normalizer is deprecated + since Symfony 6.1. Implement the + :class:`Symfony\\Component\\Serializer\\Normalizer\\NormalizerAwareInterface` + and use the + :class:`Symfony\\Component\\Serializer\\Normalizer\\NormalizerAwareTrait` instead + to inject the ``$normalizer`` property. + Registering it in your Application ----------------------------------