From c6d1a6f9db94fda5e239e55492fdf4740093a642 Mon Sep 17 00:00:00 2001 From: satalaondrej Date: Wed, 10 Nov 2021 20:33:30 +0100 Subject: [PATCH] [Serializer] PropertyNormalizer - return unique (i.e. filter duplicate ) attributes in extractAttributes function --- .../Component/Serializer/Normalizer/PropertyNormalizer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php index 9989c60e40643..8ecd340816698 100644 --- a/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php @@ -119,7 +119,7 @@ protected function extractAttributes($object, $format = null, array $context = [ } } while ($reflectionObject = $reflectionObject->getParentClass()); - return $attributes; + return array_unique($attributes); } /**