Skip to content

Commit 975f634

Browse files
committed
fix merge
1 parent d47be2e commit 975f634

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor;
1919
use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor;
2020
use Symfony\Component\PropertyInfo\PropertyInfoExtractor;
21-
use Symfony\Component\Serializer\Annotation\Ignore;
21+
use Symfony\Component\Serializer\Attribute\Ignore;
2222
use Symfony\Component\Serializer\Exception\LogicException;
2323
use Symfony\Component\Serializer\Exception\RuntimeException;
2424
use Symfony\Component\Serializer\Exception\UnexpectedValueException;
@@ -902,26 +902,26 @@ public function testSamePropertyAsMethodWithMethodSerializedName()
902902
$this->assertSame($expected, $this->normalizer->normalize($object));
903903
}
904904

905-
public function testNormalizeWithIgnoreAnnotationAndPrivateProperties()
905+
public function testNormalizeWithIgnoreAttributeAndPrivateProperties()
906906
{
907-
$classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()));
907+
$classMetadataFactory = new ClassMetadataFactory(new AttributeLoader());
908908
$normalizer = new ObjectNormalizer($classMetadataFactory);
909909

910-
$this->assertSame(['foo' => 'foo'], $normalizer->normalize(new ObjectDummyWithIgnoreAnnotationAndPrivateProperty()));
910+
$this->assertSame(['foo' => 'foo'], $normalizer->normalize(new ObjectDummyWithIgnoreAttributeAndPrivateProperty()));
911911
}
912912

913-
public function testDenormalizeWithIgnoreAnnotationAndPrivateProperties()
913+
public function testDenormalizeWithIgnoreAttributeAndPrivateProperties()
914914
{
915-
$classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()));
915+
$classMetadataFactory = new ClassMetadataFactory(new AttributeLoader());
916916
$normalizer = new ObjectNormalizer($classMetadataFactory);
917917

918918
$obj = $normalizer->denormalize([
919919
'foo' => 'set',
920920
'ignore' => 'set',
921921
'private' => 'set',
922-
], ObjectDummyWithIgnoreAnnotationAndPrivateProperty::class);
922+
], ObjectDummyWithIgnoreAttributeAndPrivateProperty::class);
923923

924-
$expected = new ObjectDummyWithIgnoreAnnotationAndPrivateProperty();
924+
$expected = new ObjectDummyWithIgnoreAttributeAndPrivateProperty();
925925
$expected->foo = 'set';
926926

927927
$this->assertEquals($expected, $obj);
@@ -1199,11 +1199,11 @@ public function getInner()
11991199
}
12001200
}
12011201

1202-
class ObjectDummyWithIgnoreAnnotationAndPrivateProperty
1202+
class ObjectDummyWithIgnoreAttributeAndPrivateProperty
12031203
{
12041204
public $foo = 'foo';
12051205

1206-
/** @Ignore */
1206+
#[Ignore]
12071207
public $ignored = 'ignored';
12081208

12091209
private $private = 'private';

0 commit comments

Comments
 (0)