From 1c8edc55ad7d88c876c3facb8811c20db320fe18 Mon Sep 17 00:00:00 2001 From: Teoh Han Hui Date: Tue, 12 Nov 2019 18:51:12 +0100 Subject: [PATCH] Allow returning null from NormalizerInterface::normalize --- .../Component/Serializer/Normalizer/NormalizerInterface.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php b/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php index 02a211858492..4e0fbfb7a6b1 100644 --- a/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php @@ -30,9 +30,9 @@ interface NormalizerInterface * @param string $format Format the normalization result will be encoded as * @param array $context Context options for the normalizer * - * @return array|string|int|float|bool + * @return array|string|int|float|bool|null * - * @throws InvalidArgumentException Occurs when the object given is not an attempted type for the normalizer + * @throws InvalidArgumentException Occurs when the object given is not a supported type for the normalizer * @throws CircularReferenceException Occurs when the normalizer detects a circular reference when no circular * reference handler can fix it * @throws LogicException Occurs when the normalizer is not called in an expected context