Skip to content

Commit c499c71

Browse files
committed
Merge branch '7.2' into 7.3
* 7.2: [Serializer] type: align with interface signature for denormalize methods
2 parents 2755d65 + 3e42d81 commit c499c71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

serializer/custom_context_builders.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ value is ``0000-00-00``. To do that you'll first have to create your normalizer:
2727
{
2828
use DenormalizerAwareTrait;
2929

30-
public function denormalize($data, string $type, ?string $format = null, array $context = []): mixed
30+
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
3131
{
3232
if ('0000-00-00' === $data) {
3333
return null;
@@ -38,7 +38,7 @@ value is ``0000-00-00``. To do that you'll first have to create your normalizer:
3838
return $this->denormalizer->denormalize($data, $type, $format, $context);
3939
}
4040

41-
public function supportsDenormalization($data, string $type, ?string $format = null, array $context = []): bool
41+
public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool
4242
{
4343
return true === ($context['zero_datetime_to_null'] ?? false)
4444
&& is_a($type, \DateTimeInterface::class, true);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy