Skip to content

Commit 5d081b2

Browse files
committed
minor symfony#11994 add $context argument to supportsNormalization() (xabbuh)
This PR was merged into the 3.4 branch. Discussion ---------- add $context argument to supportsNormalization() reverts symfony#11613, the context will actually be passed as the third argument here (see https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/Serializer/Serializer.php#L242) Commits ------- 9a44b3f add $context argument to supportsNormalization()
2 parents 2171355 + 9a44b3f commit 5d081b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

serializer/custom_normalizer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ to customize the normalized data. To do that, leverage the ``ObjectNormalizer``:
4747
return $data;
4848
}
4949

50-
public function supportsNormalization($data, $format = null)
50+
public function supportsNormalization($data, $format = null, array $context = [])
5151
{
5252
return $data instanceof Topic;
5353
}

0 commit comments

Comments
 (0)