From 7332b90dfc291ac5b4b83fbca2081936faa1e3f9 Mon Sep 17 00:00:00 2001 From: Nico Haase Date: Fri, 12 May 2023 16:51:50 +0200 Subject: [PATCH] Extend Serializer stubs --- .../Component/Serializer/Encoder/DecoderInterface.stub | 3 ++- .../Component/Serializer/Encoder/EncoderInterface.stub | 3 ++- .../Serializer/Normalizer/DenormalizerInterface.stub | 3 ++- .../Component/Serializer/Normalizer/NormalizerInterface.stub | 4 +++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/stubs/Symfony/Component/Serializer/Encoder/DecoderInterface.stub b/stubs/Symfony/Component/Serializer/Encoder/DecoderInterface.stub index a9923edf..e19f772e 100644 --- a/stubs/Symfony/Component/Serializer/Encoder/DecoderInterface.stub +++ b/stubs/Symfony/Component/Serializer/Encoder/DecoderInterface.stub @@ -18,7 +18,8 @@ interface DecoderInterface /** * @param string $format Format name + * @param array $context * @return bool */ - public function supportsDecoding($format); + public function supportsDecoding($format, array $context = []); } diff --git a/stubs/Symfony/Component/Serializer/Encoder/EncoderInterface.stub b/stubs/Symfony/Component/Serializer/Encoder/EncoderInterface.stub index 2d97bde3..11e374eb 100644 --- a/stubs/Symfony/Component/Serializer/Encoder/EncoderInterface.stub +++ b/stubs/Symfony/Component/Serializer/Encoder/EncoderInterface.stub @@ -18,7 +18,8 @@ interface EncoderInterface /** * @param string $format Format name + * @param array $context * @return bool */ - public function supportsEncoding($format); + public function supportsEncoding($format, array $context = []); } diff --git a/stubs/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.stub b/stubs/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.stub index cb9af06d..b7e9968b 100644 --- a/stubs/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.stub +++ b/stubs/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.stub @@ -33,7 +33,8 @@ interface DenormalizerInterface * @param mixed $data * @param string $type * @param string|null $format + * @param array $context * @return bool */ - public function supportsDenormalization($data, $type, $format = null); + public function supportsDenormalization($data, $type, $format = null, array $context = []); } diff --git a/stubs/Symfony/Component/Serializer/Normalizer/NormalizerInterface.stub b/stubs/Symfony/Component/Serializer/Normalizer/NormalizerInterface.stub index fac60042..ba86b6b6 100644 --- a/stubs/Symfony/Component/Serializer/Normalizer/NormalizerInterface.stub +++ b/stubs/Symfony/Component/Serializer/Normalizer/NormalizerInterface.stub @@ -27,7 +27,9 @@ interface NormalizerInterface /** * @param mixed $data * @param string|null $format + * @param array $context + * * @return bool */ - public function supportsNormalization($data, $format = null); + public function supportsNormalization($data, $format = null, array $context = []); }