Skip to content

Commit

Permalink
fix: implicitly nullable parameter declarations deprecation
Browse files Browse the repository at this point in the history
Implicitly nullable parameter declarations is deprecated in PHP 8.4
  • Loading branch information
jeremyFreeAgent authored and dunglas committed Nov 26, 2024
1 parent 70387a1 commit e411143
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TypedSerializerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit e411143

Please sign in to comment.