@@ -731,9 +731,9 @@ for encoding (array to format) and
731
731
732
732
You can add new encoders to a Serializer instance by using its second constructor argument::
733
733
734
- use Symfony\Component\Serializer\Serializer;
735
- use Symfony\Component\Serializer\Encoder\XmlEncoder;
736
734
use Symfony\Component\Serializer\Encoder\JsonEncoder;
735
+ use Symfony\Component\Serializer\Encoder\XmlEncoder;
736
+ use Symfony\Component\Serializer\Serializer;
737
737
738
738
$encoders = [new XmlEncoder(), new JsonEncoder()];
739
739
$serializer = new Serializer([], $encoders);
@@ -1045,11 +1045,11 @@ maximum depth is reached. This is especially useful when serializing entities
1045
1045
having unique identifiers::
1046
1046
1047
1047
use Doctrine\Common\Annotations\AnnotationReader;
1048
- use Symfony\Component\Serializer\Serializer;
1049
1048
use Symfony\Component\Serializer\Annotation\MaxDepth;
1050
1049
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
1051
1050
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
1052
1051
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
1052
+ use Symfony\Component\Serializer\Serializer;
1053
1053
1054
1054
class Foo
1055
1055
{
@@ -1211,8 +1211,8 @@ If the class constructor defines arguments, as usually happens with
1211
1211
arguments are missing. In those cases, use the ``default_constructor_arguments ``
1212
1212
context option::
1213
1213
1214
- use Symfony\Component\Serializer\Serializer;
1215
1214
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
1215
+ use Symfony\Component\Serializer\Serializer;
1216
1216
1217
1217
class MyObj
1218
1218
{
@@ -1331,8 +1331,8 @@ this is already set up and you only need to provide the configuration. Otherwise
1331
1331
1332
1332
// ...
1333
1333
use Symfony\Component\Serializer\Encoder\JsonEncoder;
1334
- use Symfony\Component\Serializer\Mapping\ClassDiscriminatorMapping;
1335
1334
use Symfony\Component\Serializer\Mapping\ClassDiscriminatorFromClassMetadata;
1335
+ use Symfony\Component\Serializer\Mapping\ClassDiscriminatorMapping;
1336
1336
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
1337
1337
use Symfony\Component\Serializer\Serializer;
1338
1338
0 commit comments