Skip to content

Commit

Permalink
[Serializer] Use NormalizerInterface instead of ObjectNormalizer
Browse files Browse the repository at this point in the history
  • Loading branch information
mtarld committed Oct 7, 2023
1 parent 66a8003 commit 3e9af1b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions serializer/custom_normalizer.rst
Expand Up @@ -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
----------------------------------

Expand Down

0 comments on commit 3e9af1b

Please sign in to comment.