Skip to content

Commit

Permalink
feat: use attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
rem42 committed Feb 21, 2024
1 parent 8c7c6b1 commit 27606af
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Factory/SerializerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

namespace Scraper\ScraperColissimo\Factory;

use Doctrine\Common\Annotations\AnnotationReader;
use Symfony\Component\PropertyAccess\PropertyAccess;
use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor;
use Symfony\Component\Serializer\Encoder\JsonEncoder;
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
use Symfony\Component\Serializer\Mapping\Loader\AttributeLoader;
use Symfony\Component\Serializer\NameConverter\MetadataAwareNameConverter;
use Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer;
use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer;
Expand All @@ -21,7 +20,7 @@ class SerializerFactory
{
public static function create(): Serializer
{
$classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()));
$classMetadataFactory = new ClassMetadataFactory(new AttributeLoader());

$metadataAwareNameConverter = new MetadataAwareNameConverter($classMetadataFactory);

Expand Down

0 comments on commit 27606af

Please sign in to comment.