From ffdb0665eda6e1a1a8d1c4b150b1a5945d8ce6fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Romey?= Date: Tue, 26 Nov 2024 11:28:09 +0100 Subject: [PATCH] fix: implicitly nullable parameter declarations deprecation Implicitly nullable parameter declarations is deprecated in PHP 8.4 --- src/TypedSerializerTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TypedSerializerTrait.php b/src/TypedSerializerTrait.php index a03f6c2..a1dcf14 100644 --- a/src/TypedSerializerTrait.php +++ b/src/TypedSerializerTrait.php @@ -21,12 +21,12 @@ trait TypedSerializerTrait denormalize as private doDenormalize; } - public function normalize(mixed $data, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { return $this->doNormalize($data, $format, $context); } - 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 { return $this->doDenormalize($data, $type, $format, $context); }