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

Skip to content

Commit 3e9af1b

Browse files
committed
[Serializer] Use NormalizerInterface instead of ObjectNormalizer
1 parent 66a8003 commit 3e9af1b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

serializer/custom_normalizer.rst

+9
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.1
52+
53+
Injecting an ``ObjectNormalizer`` in your custom normalizer is deprecated
54+
since Symfony 6.1. Implement the
55+
:class:`Symfony\\Component\\Serializer\\Normalizer\\NormalizerAwareInterface`
56+
and use 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)