8000 [Serializer] Fix merge · symfony/symfony@2083154 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2083154

Browse files
committed
[Serializer] Fix merge
1 parent a5dc122 commit 2083154

File tree

3 files changed

+10
-26
lines changed

3 files changed

+10
-26
lines changed

src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodWithMethodSerializedNameDummy.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,25 @@ public function __construct($freeTrial, $hasSubscribe, $getReady, $isActive)
2828
$this->isActive = $isActive;
2929
}
3030

31-
/**
32-
* @SerializedName("free_trial_method")
33-
*/
31+
#[SerializedName('free_trial_method')]
3432
public function getFreeTrial()
3533
{
3634
return $this->freeTrial;
3735
}
3836

39-
/**
40-
* @SerializedName("has_subscribe_method")
41-
*/
37+
#[SerializedName('has_subscribe_method')]
4238
public function hasSubscribe()
4339
{
4440
return $this->hasSubscribe;
4541
}
4642

47-
/**
48-
* @SerializedName("get_ready_method")
49-
*/
43+
#[SerializedName('get_ready_method')]
5044
public function getReady()
5145
{
5246
return $this->getReady;
5347
}
5448

55-
/**
56-
* @SerializedName("is_active_method")
57-
*/
49+
#[SerializedName('is_active_method')]
5850
public function isActive()
5951
{
6052
return $this->isActive;

src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodWithPropertySerializedNameDummy.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,16 @@
1515

1616
class SamePropertyAsMethodWithPropertySerializedNameDummy
1717
{
18-
/**
19-
* @SerializedName("free_trial_property")
20-
*/
18+
#[SerializedName('free_trial_property')]
2119
private $freeTrial;
2220

23-
/**
24-
* @SerializedName("has_subscribe_property")
25-
*/
21+
#[SerializedName('has_subscribe_property')]
2622
private $hasSubscribe;
2723

28-
/**
29-
* @SerializedName("get_ready_property")
30-
*/
24+
#[SerializedName('get_ready_property')]
3125
private $getReady;
3226

33-
/**
34-
* @SerializedName("is_active_property")
35-
*/
27+
#[SerializedName('is_active_property')]
3628
private $isActive;
3729

3830
public function __construct($freeTrial, $hasSubscribe, $getReady, $isActive)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ public function testSamePropertyAsMethod()
869869

870870
public function testSamePropertyAsMethodWithPropertySerializedName()
871871
{
872-
$classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()));
872+
$classMetadataFactory = new ClassMetadataFactory(new AttributeLoader());
873873
$this->normalizer = new ObjectNormalizer($classMetadataFactory, new MetadataAwareNameConverter($classMetadataFactory));
874874
$this->normalizer->setSerializer($this->serializer);
875875

@@ -886,7 +886,7 @@ public function testSamePropertyAsMethodWithPropertySerializedName()
886886

887887
public function testSamePropertyAsMethodWithMethodSerializedName()
888888
{
889-
$classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()));
889+
$classMetadataFactory = new ClassMetadataFactory(new AttributeLoader());
890890
$this->normalizer = new ObjectNormalizer($classMetadataFactory, new MetadataAwareNameConverter($classMetadataFactory));
891891
$this->normalizer->setSerializer($this->serializer);
892892

0 commit comments

Comments
 (0)
0