diff --git a/components/serializer.rst b/components/serializer.rst index c197d1b92ae..fdc0dd99519 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -799,10 +799,10 @@ Here, we set it to 2 for the ``$child`` property: .. code-block:: php-annotations - use Symfony\Component\Serializer\Annotation\MaxDepth; - namespace Acme; + use Symfony\Component\Serializer\Annotation\MaxDepth; + class MyObj { /** @@ -979,13 +979,13 @@ When using the component standalone, an implementation of :class:`Symfony\\Compo (usually an instance of :class:`Symfony\\Component\\PropertyInfo\\PropertyInfoExtractor`) must be passed as the 4th parameter of the ``ObjectNormalizer``:: + namespace Acme; + use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; use Symfony\Component\Serializer\Serializer; use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer; use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; - namespace Acme; - class ObjectOuter { private $inner;