diff --git a/src/SymfonyGetSetNormalizerBenchmark.php b/src/SymfonyGetSetNormalizerBenchmark.php index 7485ea8..005592d 100644 --- a/src/SymfonyGetSetNormalizerBenchmark.php +++ b/src/SymfonyGetSetNormalizerBenchmark.php @@ -10,6 +10,7 @@ use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory; use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader; +use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer; use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer; use Symfony\Component\Serializer\Serializer; @@ -34,7 +35,7 @@ public function setUp() ); $this->serializer = new Serializer( - [new GetSetMethodNormalizer($classMetadataFactory)], + [new DateTimeNormalizer(), new GetSetMethodNormalizer($classMetadataFactory)], [new JsonEncoder(), new XmlEncoder(), new YamlEncoder()] ); } diff --git a/src/SymfonyObjectNormalizerBenchmark.php b/src/SymfonyObjectNormalizerBenchmark.php index 57442a4..e3c83e8 100644 --- a/src/SymfonyObjectNormalizerBenchmark.php +++ b/src/SymfonyObjectNormalizerBenchmark.php @@ -11,6 +11,7 @@ use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory; use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader; +use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer; use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; use Symfony\Component\Serializer\Serializer; @@ -39,7 +40,7 @@ public function setUp() ->getPropertyAccessor(); $this->serializer = new Serializer( - [new ObjectNormalizer($classMetadataFactory, null, $propertyAccessor)], + [new DateTimeNormalizer(), new ObjectNormalizer($classMetadataFactory, null, $propertyAccessor)], [new JsonEncoder(), new XmlEncoder(), new YamlEncoder()] ); }