From 8b2d944763a8664eef04fc7bb924b25c590ac765 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Mon, 24 Jul 2023 14:25:41 +0200 Subject: [PATCH] [Serializer] Custom normalizer deprecation --- serializer/custom_normalizer.rst | 9 +++++++++ 1 file changed, 9 insertions(+) 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 ----------------------------------