Skip to content

Commit 3e42d81

Browse files
committed
Merge branch '6.4' into 7.2
* 6.4: [Serializer] type: align with interface signature for denormalize methods
2 parents ae1461e + 3f4ef4b commit 3e42d81

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)