From a756044deb858e63540626c3e9e9c85b99b8706c Mon Sep 17 00:00:00 2001 From: Tony Tran Date: Mon, 5 Aug 2019 15:23:47 +0200 Subject: [PATCH] Replace NormalizerInterface by ContextAwareNormalizerInterface to use context in supportNormalization method --- serializer/custom_normalizer.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/serializer/custom_normalizer.rst b/serializer/custom_normalizer.rst index a85f70e4eac..9f2e50fdcf1 100644 --- a/serializer/custom_normalizer.rst +++ b/serializer/custom_normalizer.rst @@ -21,10 +21,10 @@ to customize the normalized data. To do that, leverage the ``ObjectNormalizer``: use App\Entity\Topic; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; - use Symfony\Component\Serializer\Normalizer\NormalizerInterface; + use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface; use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; - class TopicNormalizer implements NormalizerInterface + class TopicNormalizer implements ContextAwareNormalizerInterface { private $router; private $normalizer;