Skip to content

Commit 0451bca

Browse files
committed
minor #18602 [Serializer] Custom normalizer deprecation (alexandre-daubois)
This PR was merged into the 6.4 branch. Discussion ---------- [Serializer] Custom normalizer deprecation Part of #18507 Commits ------- 8b2d944 [Serializer] Custom normalizer deprecation
2 parents a0e3aa3 + 8b2d944 commit 0451bca

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

serializer/custom_normalizer.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ to customize the normalized data. To do that, leverage the ``ObjectNormalizer``:
4848
}
4949
}
5050

51+
.. deprecated:: 6.4
52+
53+
Injecting an ``ObjectNormalizer`` in your custom normalizer is deprecated
54+
since Symfony 6.4. Implement the
55+
:class:`Symfony\\Component\\Serializer\\Normalizer\\NormalizerAwareInterface`
56+
and use the the
57+
:class:`Symfony\\Component\\Serializer\\Normalizer\\NormalizerAwareTrait` instead
58+
to inject the ``$normalizer`` property.
59+
5160
Registering it in your Application
5261
----------------------------------
5362

0 commit comments

Comments
 (0)