diff -ru src/Symfony/Component/Serializer/Normalizer/UnwrappingDenormalizer.php src/Symfony/Component/Serializer/Normalizer/UnwrappingDenormalizer.php --- src/Symfony/Component/Serializer/Normalizer/UnwrappingDenormalizer.php 2024-05-15 12:15:17.946787581 +0000 +++ src/Symfony/Component/Serializer/Normalizer/UnwrappingDenormalizer.php 2024-05-15 12:15:19.079827459 +0000 @@ -27,7 +27,7 @@ private readonly PropertyAccessorInterface $propertyAccessor; - public function __construct(PropertyAccessorInterface $propertyAccessor = null) + public function __construct(?PropertyAccessorInterface $propertyAccessor = null) { $this->propertyAccessor = $propertyAccessor ?? PropertyAccess::createPropertyAccessor(); } @@ -37,7 +37,7 @@ return ['*' => false]; } - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed { $propertyPath = $context[self::UNWRAP_PATH]; $context['unwrapped'] = true; @@ -53,7 +53,7 @@ return $this->denormalizer->denormalize($data, $type, $format, $context); } - public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { return \array_key_exists(self::UNWRAP_PATH, $context) && !isset($context['unwrapped']); }