diff --git a/serializer/custom_encoders.rst b/serializer/custom_encoders.rst index e3436c9cdec..3d5f7856a00 100644 --- a/serializer/custom_encoders.rst +++ b/serializer/custom_encoders.rst @@ -32,7 +32,7 @@ create your own encoder that uses the return Yaml::dump($data); } - public function supportsEncoding($format) + public function supportsEncoding($format, array $context = []) { return 'yaml' === $format; } @@ -42,7 +42,7 @@ create your own encoder that uses the return Yaml::parse($data); } - public function supportsDecoding($format) + public function supportsDecoding($format, array $context = []) { return 'yaml' === $format; } diff --git a/serializer/custom_normalizer.rst b/serializer/custom_normalizer.rst index b82b61e8e07..1794590c5c8 100644 --- a/serializer/custom_normalizer.rst +++ b/serializer/custom_normalizer.rst @@ -47,7 +47,7 @@ to customize the normalized data. To do that, leverage the ``ObjectNormalizer``: return $data; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = []) { return $data instanceof Topic; }