8000 minor #31005 [Serializer] take setIgnoredAttributes() deprecation int… · symfony/symfony@f794e41 · GitHub
[go: up one dir, main page]

Skip to content

Commit f794e41

Browse files
committed
minor #31005 [Serializer] take setIgnoredAttributes() deprecation into account (xabbuh)
This PR was merged into the 4.2 branch. Discussion ---------- [Serializer] take setIgnoredAttributes() deprecation into account | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 4134be1 take setIgnoredAttributes() deprecation into account
2 parents 08f24b0 + 4134be1 commit f794e41

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,8 @@ private function doTestIgnoredAttributes(bool $legacy = false)
497497
$this->normalizer->normalize($obj, 'any')
498498
);
499499

500-
$this->normalizer->setIgnoredAttributes(['foo', 'baz', 'camelCase', 'object']);
500+
$ignoredAttributes = ['foo', 'baz', 'camelCase', 'object'];
501+
$legacy ? $this->normalizer->setIgnoredAttributes($ignoredAttributes) : $this->createNormalizer([ObjectNormalizer::IGNORED_ATTRIBUTES => $ignoredAttributes]);
501502

502503
$this->assertEquals(
503504
[

0 commit comments

Comments
 (0)
0