8000 [FrameworkBundle][Serializer] Deprecate annotations · symfony/symfony@132a5d5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 132a5d5

Browse files
[FrameworkBundle][Serializer] Deprecate annotations
1 parent 62e115f commit 132a5d5

27 files changed

+157
-124
lines changed

UPGRADE-6.4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Serializer
146146
----------
147147

148148
* Deprecate Doctrine annotations support in favor of native attributes
149-
* Deprecate passing an annotation reader to the constructor of `AnnotationLoader`
149+
* Deprecate `AnnotationLoader`, use `AttributeLoader` instead
150150

151151
Templating
152152
----------

src/Symfony/Bridge/Twig/Tests/Extension/SerializerExtensionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use Symfony\Component\Serializer\Encoder\JsonEncoder;
1919
use Symfony\Component\Serializer\Encoder\YamlEncoder;
2020
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
21-
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
21+
use Symfony\Component\Serializer\Mapping\Loader\AttributeLoader;
2222
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
2323
use Symfony\Component\Serializer\Serializer;
2424
use Twig\Environment;
@@ -49,7 +49,7 @@ public static function serializerDataProvider(): \Generator
10000
4949

5050
private function getTwig(string $template): Environment
5151
{
52-
$meta = new ClassMetadataFactory(new AnnotationLoader());
52+
$meta = new ClassMetadataFactory(new AttributeLoader());
5353
$runtime = new SerializerRuntime(new Serializer([new ObjectNormalizer($meta)], [new JsonEncoder(), new YamlEncoder()]));
5454

5555
$mockRuntimeLoader = $this->createMock(RuntimeLoaderInterface::class);

src/Symfony/Bridge/Twig/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"symfony/security-core": "^5.4|^6.0|^7.0",
4444
"symfony/security-csrf": "^5.4|^6.0|^7.0",
4545
"symfony/security-http": "^5.4|^6.0|^7.0",
46-
"symfony/serializer": "^6.2|^7.0",
46+
"symfony/serializer": "^6.4|^7.0",
4747
"symfony/stopwatch": "^5.4|^6.0|^7.0",
4848
"symfony/console": "^5.4|^6.0|^7.0",
4949
"symfony/expression-language": "^5.4|^6.0|^7.0",
@@ -61,7 +61,7 @@
6161
"symfony/http-foundation": "<5.4",
6262
"symfony/http-kernel": "<6.2",
6363
"symfony/mime": "<6.2",
64-
"symfony/serializer": "<6.2",
64+
"symfony/serializer": "<6.4",
6565
"symfony/translation": "<5.4",
6666
"symfony/workflow": "<5.4"
6767
},

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
use Symfony\Component\Semaphore\Store\StoreFactory as SemaphoreStoreFactory;
163163
use Symfony\Component\Serializer\Encoder\DecoderInterface;
164164
use Symfony\Component\Serializer\Encoder\EncoderInterface;
165-
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
165+
use Symfony\Component\Serializer\Mapping\Loader\AttributeLoader;
166166
use Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader;
167167
use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader;
168168
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
@@ -1935,12 +1935,7 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
19351935
$container->removeDefinition('serializer.mapping.cache_class_metadata_factory');
19361936
}
19371937

1938-
$annotationLoader = new Definition(
1939-
AnnotationLoader::class,
1940-
[new Reference('annotation_reader', ContainerInterface::NULL_ON_INVALID_REFERENCE)]
1941-
);
1942-
1943-
$serializerLoaders[] = $annotationLoader;
1938+
$serializerLoaders[] = new Definition(AttributeLoader::class);
19441939
}
19451940

19461941
$fileRecorder = function ($extension, $path) use (&$serializerLoaders) {

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
use Symfony\Component\Notifier\TexterInterface;
6666
use Symfony\Component\PropertyAccess\PropertyAccessor;
6767
use Symfony\Component\Security\Core\AuthenticationEvents;
68-
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
68+
use Symfony\Component\Serializer\Mapping\Loader\AttributeLoader;
6969
use Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader;
7070
use Symfony\Component\Serializer\Mapping\Loader\YamlFileLo 2851 ader;
7171
use Symfony\Component\Serializer\Normalizer\ConstraintViolationListNormalizer;
@@ -1489,7 +1489,7 @@ public function testSerializerEnabled()
14891489
$argument = $container->getDefinition('serializer.mapping.chain_loader')->getArgument(0);
14901490

14911491
$this->assertCount(2, $argument);
1492-
$this->assertEquals(AnnotationLoader::class, $argument[0]->getClass());
1492+
$this->assertEquals(AttributeLoader::class, $argument[0]->getClass());
14931493
$this->assertEquals(new Reference('serializer.name_converter.camel_case_to_snake_case'), $container->getDefinition('serializer.name_converter.metadata_aware')->getArgument(1));
14941494
$this->assertEquals(new Reference('property_info', ContainerBuilder::IGNORE_ON_INVALID_REFERENCE), $container->getDefinition('serializer.normalizer.object')->getArgument(3));
14951495
$this->assertArrayHasKey('circular_reference_handler', $container->getDefinition('serializer.normalizer.object')->getArgument(6));

src/Symfony/Bundle/SecurityBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"symfony/ldap": "^5.4|^6.0|^7.0",
4545
"symfony/process": "^5.4|^6.0|^7.0",
4646
"symfony/rate-limiter": "^5.4|^6.0|^7.0",
47-
"symfony/serializer": "^5.4|^6.0|^7.0",
47+
"symfony/serializer": "^6.4|^7.0",
4848
"symfony/translation": "^5.4|^6.0|^7.0",
4949
"symfony/twig-bundle": "^5.4|^6.0|^7.0",
5050
"symfony/twig-bridge": "^5.4|^6.0|^7.0",

src/Symfony/Component/HttpKernel/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"symfony/translation": "<5.4",
6767
"symfony/translation-contracts": "<2.5",
6868
"symfony/twig-bridge": "<5.4",
69-
"symfony/validator": "<5.4",
69+
"symfony/validator": "<6.4",
7070
"symfony/var-dumper": "<6.3",
7171
"twig/twig": "<2.13"
7272
},

src/Symfony/Component/PropertyInfo/Tests/Extractor/SerializerExtractorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy;
1818
use Symfony\Component\PropertyInfo\Tests\Fixtures\IgnorePropertyDummy;
1919
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
20-
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
20+
use Symfony\Component\Serializer\Mapping\Loader\AttributeLoader;
2121

2222
/**
2323
* @author Kévin Dunglas <dunglas@gmail.com>
@@ -28,7 +28,7 @@ class SerializerExtractorTest extends TestCase
2828

2929
protected function setUp(): void
3030
{
31-
$classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader());
31+
$classMetadataFactory = new ClassMetadataFactory(new AttributeLoader());
3232
$this->extractor = new SerializerExtractor($classMetadataFactory);
3333
}
3434

src/Symfony/Component/PropertyInfo/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"symfony/string": "^5.4|^6.0|^7.0"
2828
},
2929
"require-dev": {
30-
"symfony/serializer": "^5.4|^6.0|^7.0",
30+
"symfony/serializer": "^6.4|^7.0",
3131
"symfony/cache": "^5.4|^6.0|^7.0",
3232
"symfony/dependency-injection": "^5.4|^6.0|^7.0",
3333
"phpdocumentor/reflection-docblock": "^5.2",
@@ -37,7 +37,7 @@
3737
"phpdocumentor/reflection-docblock": "<5.2",
3838
"phpdocumentor/type-resolver": "<1.5.1",
3939
"symfony/dependency-injection": "<5.4",
40-
"symfony/serializer": "<5.4"
40+
"symfony/serializer": "<6.4"
4141
},
4242
"autoload": {
4343
"psr-4": { "Symfony\\Component\\PropertyInfo\\": "" },

src/Symfony/Component/Serializer/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ CHANGELOG
55
---
66

77
* Deprecate Doctrine annotations support in favor of native attributes
8-
* Deprecate passing an annotation reader to the constructor of `AnnotationLoader`
98
* Allow the `Groups` attribute/annotation on classes
109
* JsonDecode: Add `json_decode_detailed_errors` option
10+
* Deprecate `AnnotationLoader`, use `AttributeLoader` instead
1111

1212
6.3
1313
---

src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@
2828
/**
2929
* Loader for Doctrine annotations and PHP 8 attributes.
3030
*
31+
* @deprecated since Symfony 6.4, use {@see AttributeLoader} instead
32+
*
3133
* @author Kévin Dunglas <dunglas@gmail.com>
3234
* @author Alexander M. Turek <me@derrabus.de>
3335
*/
3436
class AnnotationLoader implements LoaderInterface
3537
{
36-
private const KNOWN_ANNOTATIONS = [
38+
private const KNOWN_ATTRIBUTES = [
3739
DiscriminatorMap::class,
3840
Groups::class,
3941
Ignore::class,
@@ -46,9 +48,6 @@ class AnnotationLoader implements LoaderInterface
4648
public function __construct(
4749
private readonly ?Reader $reader = null,
4850
) {
49-
if ($reader) {
50-
trigger_deprecation('symfony/validator', '6.4', 'Passing a "%s" instance as argument 1 to "%s()" is deprecated, pass null or omit the parameter instead.', get_debug_type($reader), __METHOD__);
51-
}
5251
}
5352

5453
public function loadClassMetadata(ClassMetadataInterface $classMetadata): bool
@@ -60,7 +59,7 @@ public function loadClassMetadata(ClassMetadataInterface $classMetadata): bool
6059

6160
$attributesMetadata = $classMetadata->getAttributesMetadata();
6261

63-
foreach ($this->loadAnnotations($reflectionClass) as $annotation) {
62+
foreach ($this->loadAttributes($reflectionClass) as $annotation) {
6463
if ($annotation instanceof DiscriminatorMap) {
6564
$classMetadata->setClassDiscriminatorMapping(new ClassDiscriminatorMapping(
6665
$annotation->getTypeProperty(),
@@ -85,7 +84,7 @@ public function loadClassMetadata(ClassMetadataInterface $classMetadata): bool
8584
$attributesMetadata[$property->name]->addGroup($group);
8685
}
8786

88-
foreach ($this->loadAnnotations($property) as $annotation) {
87+
foreach ($this->loadAttributes($property) as $annotation) {
8988
if ($annotation instanceof Groups) {
9089
foreach ($annotation->getGroups() as $group) {
9190
$attributesMetadata[$property->name]->addGroup($group);
@@ -128,7 +127,7 @@ public function loadClassMetadata(ClassMetadataInterface $classMetadata): bool
128127
}
129128
}
130129

131-
foreach ($this->loadAnnotations($method) as $annotation) {
130+
foreach ($this->loadAttributes($method) as $annotation) {
132131
if ($annotation instanceof Groups) {
133132
if (!$accessorOrMutator) {
134133
throw new MappingException(sprintf('Groups on "%s::%s()" cannot be added. Groups can only be added on methods beginning with "get", "is", "has" or "set".', $className, $method->name));
@@ -176,7 +175,7 @@ public function loadClassMetadata(ClassMetadataInterface $classMetadata): bool
176175
return $loaded;
177176
}
178177

179-
public function loadAnnotations(\ReflectionMethod|\ReflectionClass|\ReflectionProperty $reflector): iterable
178+
private function loadAttributes(\ReflectionMethod|\ReflectionClass|\ReflectionProperty $reflector): iterable
180179
{
181180
foreach ($reflector->getAttributes() as $attribute) {
182181
if ($this->isKnownAttribute($attribute->getName())) {
@@ -213,6 +212,16 @@ public function loadAnnotations(\ReflectionMethod|\ReflectionClass|\ReflectionPr
213212
}
214213
}
215214

215+
/**
216+
* @deprecated since Symfony 6.4 without replacement
217+
*/
218+
public function loadAnnotations(\ReflectionMethod|\ReflectionClass|\ReflectionProperty $reflector): iterable
219+
{
220+
trigger_deprecation('symfony/serializer', '6.4', 'Method "%s()" is deprecated without replacement.', __METHOD__);
221+
222+
return $this->loadAttributes($reflector);
223+
}
224+
216225
private function setAttributeContextsForGroups(Context $annotation, AttributeMetadataInterface $attributeMetadata): void
217226
{
218227
if ($annotation->getContext()) {
@@ -231,8 +240,8 @@ private function setAttributeContextsForGroups(Context $annotation, AttributeMet
231240

232241
private function isKnownAttribute(string $attributeName): bool
233242
{
234-
foreach (self::KNOWN_ANNOTATIONS as $knownAnnotation) {
235-
if (is_a($attributeName, $knownAnnotation, true)) {
243+
foreach (self::KNOWN_ATTRIBUTES as $knownAttribute) {
244+
if (is_a($attributeName, $knownAttribute, true)) {
236245
return true;
237246
}
238247
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\Serializer\Mapping\Loader;
13+
14+
/**
15+
* Loader for PHP attributes.
16+
*
17+
* @author Kévin Dunglas <dunglas@gmail.com>
18+
* @author Alexander M. Turek <me@derrabus.de>
19+
* @author Alexandre Daubois <alex.daubois@gmail.com>
20+
*/
21+
class AttributeLoader extends AnnotationLoader
22+
{
23+
}

src/Symfony/Component/Serializer/Tests/Command/DebugCommandTest.php

Lines changed: 2 additions & 2 deletions
341A
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Symfony\Component\Serializer\Command\DebugCommand;
1717
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
1818
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface;
19-
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
19+
use Symfony\Component\Serializer\Mapping\Loader\AttributeLoader;
2020
use Symfony\Component\Serializer\Tests\Dummy\DummyClassOne;
2121

2222
/**
@@ -26,7 +26,7 @@ class DebugCommandTest extends TestCase
2626
{
2727
public function testOutputWithClassArgument()
2828
{
29-
$command = new DebugCommand(new ClassMetadataFactory(new AnnotationLoader()));
29+
$command = new DebugCommand(new ClassMetadataFactory(new AttributeLoader()));
3030

3131
$tester = new CommandTester($command);
3232
$tester->execute(['class' => DummyClassOne::class], ['decorated' => false]);

src/Symfony/Component/Serializer/Tests/Mapping/Factory/ClassMetadataFactoryCompilerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
1616
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryCompiler;
17-
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
17+
use Symfony\Component\Serializer\Mapping\Loader\AttributeLoader;
1818
use Symfony\Component\Serializer\Tests\Fixtures\Attributes\MaxDepthDummy;
1919
use Symfony\Component\Serializer\Tests\Fixtures\Attributes\SerializedNameDummy;
2020
use Symfony\Component\Serializer\Tests\Fixtures\Attributes\SerializedPathDummy;
@@ -37,7 +37,7 @@ protected function tearDown(): void
3737

3838
public function testItDumpMetadata()
3939
{
40-
$classMetatadataFactory = new ClassMetadataFactory(new AnnotationLoader());
40+
$classMetatadataFactory = new ClassMetadataFactory(new AttributeLoader());
4141

4242
$dummyMetadata = $classMetatadataFactory->getMetadataFor(Dummy::class);
4343
$maxDepthDummyMetadata = $classMetatadataFactory->getMetadataFor(MaxDepthDummy::class);

src/Symfony/Component/Serializer/Tests/Mapping/Factory/ClassMetadataFactoryTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
1616
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface;
17-
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
17+
use Symfony\Component\Serializer\Mapping\Loader\AttributeLoader;
1818
use Symfony\Component\Serializer\Mapping\Loader\LoaderChain;
1919
use Symfony\Component\Serializer\Tests\Fixtures\Attributes\GroupDummy;
2020
use Symfony\Component\Serializer\Tests\Fixtures\Attributes\GroupDummyInterface;
@@ -34,15 +34,15 @@ public function testInterface()
3434

3535
public function testGetMetadataFor()
3636
{
37-
$factory = new ClassMetadataFactory(new AnnotationLoader());
37+
$factory = new ClassMetadataFactory(new AttributeLoader());
3838
$classMetadata = $factory->getMetadataFor(GroupDummy::class);
3939

4040
$this->assertEquals(TestClassMetadataFactory::createClassMetadata('Symfony\Component\Serializer\Tests\Fixtures\Attributes', true, true), $classMetadata);
4141
}
4242

4343
public function testHasMetadataFor()
4444
{
45-
$factory = new ClassMetadataFactory(new AnnotationLoader());
45+
$factory = new ClassMetadataFactory(new AttributeLoader());
4646
$this->assertTrue($factory->hasMetadataFor(GroupDummy::class));
4747
$this->assertTrue($factory->hasMetadataFor(GroupDummyParent::class));
4848
$this->assertTrue($factory->hasMetadataFor(GroupDummyInterface::class));

src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderWithDoctrineAnnotationsTest.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,10 @@
1818
/**
1919
* @group legacy
2020
*/
21-
class AnnotationLoaderWithDoctrineAnnotationsTest extends AnnotationLoaderTestCase
21+
class AnnotationLoaderWithDoctrineAnnotationsTest extends AttributeLoaderTestCase
2222
{
2323
use ExpectDeprecationTrait;
2424

25-
protected function setUp(): void
26-
{
27-
$this->expectDeprecation('Since symfony/validator 6.4: Passing a "Doctrine\Common\Annotations\AnnotationReader" instance as argument 1 to "Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader::__construct()" is deprecated, pass null or omit the parameter instead.');
28-
29-
parent::setUp();
30-
}
31-
3225
public function testLoadClassMetadataReturnsTrueIfSuccessful()
3326
{
3427
$this->expectDeprecation('Since symfony/serializer 6.4: Property "Symfony\Component\Serializer\Tests\Fixtures\Annotations\GroupDummy::$foo" uses Doctrine Annotations to configure serialization, which is deprecated. Use PHP attributes instead.');

src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTestCase.php renamed to src/Symfony/Component/Serializer/Tests/Mapping/Loader/AttributeLoaderTestCase.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Serializer\Tests\Mapping\Loader;
1313

1414
use PHPUnit\Framework\TestCase;
15+
use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
1516
use Symfony\Component\PropertyAccess\PropertyPath;
1617
use Symfony\Component\Serializer\Exception\MappingException;
1718
use Symfony\Component\Serializer\Mapping\AttributeMetadata;
@@ -25,9 +26,10 @@
2526
/**
2627
* @author Kévin Dunglas <dunglas@gmail.com>
2728
*/
28-
abstract class AnnotationLoaderTestCase extends TestCase
29+
abstract class AttributeLoaderTestCase extends TestCase
2930
{
3031
use ContextMappingTestTrait;
32+
use ExpectDeprecationTrait;
3133

3234
protected AnnotationLoader $loader;
3335

@@ -210,6 +212,15 @@ public function testLoadGroupsOnClass()
210212
self::assertSame(['a'], $attributesMetadata['baz']->getGroups());
211213
}
212214

215+
/**
216+
* @group legacy
217+
*/
218+
public function testExpectedDeprecationOnLoadAnnotationsCall()
219+
{
220+
$this->expectDeprecation('Since symfony/serializer 6.4: Method "Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader::loadAnnotations()" is deprecated without replacement.');
221+
$this->loader->loadAnnotations(new \ReflectionClass(\stdClass::class));
222+
}
223+
213224
abstract protected function createLoader(): AnnotationLoader;
214225

215226
abstract protected function getNamespace(): string;

src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderWithAttributesTest.php renamed to src/Symfony/Component/Serializer/Tests/Mapping/Loader/AttributeLoaderWithAttributesTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@
1414
use Symfony\Component\Serializer\Exception\MappingException;
1515
use Symfony\Component\Serializer\Mapping\ClassMetadata;
1616
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
17+
use Symfony\Component\Serializer\Mapping\Loader\AttributeLoader;
1718

18-
class AnnotationLoaderWithAttributesTest extends AnnotationLoaderTestCase
19+
class AttributeLoaderWithAttributesTest extends AttributeLoaderTestCase
1920
{
2021
protected function createLoader(): AnnotationLoader
2122
{
22-
return new AnnotationLoader();
23+
return new AttributeLoader();
2324
}
2425

2526
protected function getNamespace(): string

0 commit comments

Comments
 (0)
0