Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4a6a925

Browse filesBrowse files
minor #30824 fix testIgnoredAttributesInContext (Raulnet)
This PR was merged into the 4.2 branch. Discussion ---------- fix testIgnoredAttributesInContext | Q | A | ------------- | --- | Branch? | fix/test_serializer | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | fix CI | License | MIT <!-- fix test GetSetMethodNormalizerTest::testIgnoredAttributesInContext method setIgnoredAttributes is deprecated since 4.2 key "ignored_attributes" is use in the context --> Commits ------- 61547a2 fix testIgnoredAttributesInContext
2 parents 29b4814 + 61547a2 commit 4a6a925
Copy full SHA for 4a6a925

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
1717
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
1818
use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter;
19+
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
1920
use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer;
2021
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
2122
use Symfony\Component\Serializer\Serializer;
@@ -99,7 +100,6 @@ public function testDenormalize()
99100
public function testIgnoredAttributesInContext()
100101
{
101102
$ignoredAttributes = ['foo', 'bar', 'baz', 'object'];
102-
$this->normalizer->setIgnoredAttributes($ignoredAttributes);
103103
$obj = new GetSetDummy();
104104
$obj->setFoo('foo');
105105
$obj->setBar('bar');
@@ -109,7 +109,7 @@ public function testIgnoredAttributesInContext()
109109
'fooBar' => 'foobar',
110110
'camelCase' => true,
111111
],
112-
$this->normalizer->normalize($obj, 'any')
112+
$this->normalizer->normalize($obj, 'any', [AbstractNormalizer::IGNORED_ATTRIBUTES => $ignoredAttributes])
113113
);
114114
}
115115

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.