[Serializer] Use DenormalizerAwareInterface instead of SerializerAwareInterface

by @jschaedl

Some issues have been detected in this pull request

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/symfony/symfony/52764/d1d5ff04e33afe0a4339edbd9b8d1b9b83783f8b/cs.diff | patch -p0
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']);
     }

0
Common Typos

0
License Headers

0
Pull Request Contributor Headers

0
JSON Files Syntax

0
File Permissions

0
Merge Commits

0
Exception Messages Formatting

0
Usage of void in test files

0
Use ::class whenever possible

0
Deprecation Messages