8000 minor #13597 [Serializer] Silent deprecation notice (dunglas) · symfony/symfony@88dd97e · GitHub
[go: up one dir, main page]

Skip to content

Commit 88dd97e

Browse files
committed
minor #13597 [Serializer] Silent deprecation notice (dunglas)
This PR was merged into the 2.7 branch. Discussion ---------- [Serializer] Silent deprecation notice | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | License | MIT | Doc PR | n/a Silent deprecated notices in tests. Commits ------- 8135843 [Serializer] Silent deprecation notice
2 parents 9c32972 + 8135843 commit 88dd97e

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,10 @@ public function testDenormalizeWithObject()
9393
$this->assertEquals('bar', $obj->getBar());
9494
}
9595

96-
public function testDenormalizeOnCamelCaseFormat()
96+
public function testLegacyDenormalizeOnCamelCaseFormat()
9797
{
98+
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
99+
98100
$this->normalizer->setCamelizedAttributes(array('camel_case'));
99101
$obj = $this->normalizer->denormalize(
100102
array('camel_case' => 'camelCase'),
@@ -109,8 +111,10 @@ public function testDenormalizeNull()
109111
$this->assertEquals(new GetSetDummy(), $this->normalizer->denormalize(null, __NAMESPACE__.'\GetSetDummy'));
110112
}
111113

112-
public function testCamelizedAttributesNormalize()
114+
public function testLegacyCamelizedAttributesNormalize()
113115
{
116+
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
117+
114118
$obj = new GetCamelizedDummy('dunglas.fr');
115119
$obj->setFooBar('les-tilleuls.coop');
116120
$obj->setBar_foo('lostinthesupermarket.fr');
@@ -130,8 +134,10 @@ public function testCamelizedAttributesNormalize()
130134
));
131135
}
132136

133-
public function testCamelizedAttributesDenormalize()
137+
public function testLegacyCamelizedAttributesDenormalize()
134138
{
139+
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
140+
135141
$obj = new GetCamelizedDummy('dunglas.fr');
136142
$obj->setFooBar('les-tilleuls.coop');
137143
$obj->setBar_foo('lostinthesupermarket.fr');

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ public function testDenormalize()
6262
$this->assertEquals('bar', $obj->getBar());
6363
}
6464

65-
public function testDenormalizeOnCamelCaseFormat()
65+
public function testLegacyDenormalizeOnCamelCaseFormat()
6666
{
67+
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
68+
6769
$this->normalizer->setCamelizedAttributes(array('camel_case'));
6870
$obj = $this->normalizer->denormalize(
6971
array('camel_case' => 'value'),
@@ -72,8 +74,10 @@ public function testDenormalizeOnCamelCaseFormat()
7274
$this->assertEquals('value', $obj->getCamelCase());
7375
}
7476

75-
public function testCamelizedAttributesNormalize()
77+
public function testLegacyCamelizedAttributesNormalize()
7678
{
79+
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
80+
7781
$obj = new PropertyCamelizedDummy('dunglas.fr');
7882
$obj->fooBar = 'les-tilleuls.coop';
7983
$obj->bar_foo = 'lostinthesupermarket.fr';
@@ -93,8 +97,10 @@ public function testCamelizedAttributesNormalize()
9397
));
9498
}
9599

96-
public function testCamelizedAttributesDenormalize()
100+
public function testLegacyCamelizedAttributesDenormalize()
97101
{
102+
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
103+
98104
$obj = new PropertyCamelizedDummy('dunglas.fr');
99105
$obj->fooBar = 'les-tilleuls.coop';
100106
$obj->bar_foo = 'lostinthesupermarket.fr';

0 commit comments

Comments
 (0)
0