@@ -1352,7 +1352,8 @@ normalizers (in order of priority):
13521352 This denormalizer converts an array of arrays to an array of objects
13531353 (with the given type). See :ref: `Handling Arrays <serializer-handling-arrays >`.
13541354
1355- ByUsing the PropertyInfoExtractor you can simply annotate the arrays by '@var Person[]'
1355+ Use :class: `Symfony\\ Component\\ PropertyInfo\\ PropertyInfoExtractor ` to provide
1356+ hints with annotations like ``@var Person[] ``:
13561357
13571358 .. configuration-block ::
13581359
@@ -1367,13 +1368,9 @@ normalizers (in order of priority):
13671368 use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer;
13681369 use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
13691370 use Symfony\Component\Serializer\Serializer;
1370-
1371- $reflectionExtractor = new ReflectionExtractor();
1372- $phpDocExtractor = new PhpDocExtractor();
1373- $propertyInfo = new PropertyInfoExtractor([], [$phpDocExtractor, $reflectionExtractor]);
1374-
1375- $classMetadataFactory = new ClassMetadataFactory(new AttributeLoader());
1376- $normalizers = [new ObjectNormalizer($classMetadataFactory, null, null, $propertyInfo), new ArrayDenormalizer()];
1371+
1372+ $propertyInfo = new PropertyInfoExtractor([], [new PhpDocExtractor(), new ReflectionExtractor()]);
1373+ $normalizers = [new ObjectNormalizer(new ClassMetadataFactory(new AttributeLoader()), null, null, $propertyInfo), new ArrayDenormalizer()];
13771374
13781375 $this->serializer = new Serializer($normalizers, [new JsonEncoder()]);
13791376
0 commit comments