@@ -747,9 +747,9 @@ for encoding (array to format) and
747
747
748
748
You can add new encoders to a Serializer instance by using its second constructor argument::
749
749
750
- use Symfony\Component\Serializer\Serializer;
751
- use Symfony\Component\Serializer\Encoder\XmlEncoder;
752
750
use Symfony\Component\Serializer\Encoder\JsonEncoder;
751
+ use Symfony\Component\Serializer\Encoder\XmlEncoder;
752
+ use Symfony\Component\Serializer\Serializer;
753
753
754
754
$encoders = [new XmlEncoder(), new JsonEncoder()];
755
755
$serializer = new Serializer([], $encoders);
@@ -1061,11 +1061,11 @@ maximum depth is reached. This is especially useful when serializing entities
1061
1061
having unique identifiers::
1062
1062
1063
1063
use Doctrine\Common\Annotations\AnnotationReader;
1064
- use Symfony\Component\Serializer\Serializer;
1065
1064
use Symfony\Component\Serializer\Annotation\MaxDepth;
1066
1065
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
1067
1066
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
1068
1067
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
1068
+ use Symfony\Component\Serializer\Serializer;
1069
1069
1070
1070
class Foo
1071
1071
{
@@ -1227,8 +1227,8 @@ If the class constructor defines arguments, as usually happens with
1227
1227
arguments are missing. In those cases, use the ``default_constructor_arguments ``
1228
1228
context option::
1229
1229
1230
- use Symfony\Component\Serializer\Serializer;
1231
1230
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
1231
+ use Symfony\Component\Serializer\Serializer;
1232
1232
1233
1233
class MyObj
1234
1234
{
@@ -1347,8 +1347,8 @@ this is already set up and you only need to provide the configuration. Otherwise
1347
1347
1348
1348
// ...
1349
1349
use Symfony\Component\Serializer\Encoder\JsonEncoder;
1350
- use Symfony\Component\Serializer\Mapping\ClassDiscriminatorMapping;
1351
1350
use Symfony\Component\Serializer\Mapping\ClassDiscriminatorFromClassMetadata;
1351
+ use Symfony\Component\Serializer\Mapping\ClassDiscriminatorMapping;
1352
1352
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
1353
1353
use Symfony\Component\Serializer\Serializer;
1354
1354
0 commit comments