Skip to content

Commit f3b4364

Browse files
Fix supportsNormalization parameters definition
Add $context parameter in code example which is needed in Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface supportsNormalization definition.
1 parent b4ff675 commit f3b4364

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)