Skip to content

Commit 08a8fa5

Browse files
Merge branch '5.4' into 6.0
* 5.4: [Serializer] Add missing types to FormErrorNormalizer [HttpFoundation] Fix deps minor #47299 [Console] fix expected command name order with mixed integer and string namespaces (xabbuh) [HttpFoundation] Fix tests on PHP 8.2 fix expected command name order with mixed integer and string namespaces [Serializer] Add missing types to BackedEnumNormalizer Do not send deleted session cookie twice in the response
2 parents a269927 + 1ea9537 commit 08a8fa5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Normalizer/BackedEnumNormalizer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ final class BackedEnumNormalizer implements NormalizerInterface, DenormalizerInt
2525
/**
2626
* {@inheritdoc}
2727
*/
28-
public function normalize($object, $format = null, array $context = []): int|string
28+
public function normalize(mixed $object, string $format = null, array $context = []): int|string
2929
{
3030
if (!$object instanceof \BackedEnum) {
3131
throw new InvalidArgumentException('The data must belong to a backed enumeration.');
@@ -37,7 +37,7 @@ public function normalize($object, $format = null, array $context = []): int|str
3737
/**
3838
* {@inheritdoc}
3939
*/
40-
public function supportsNormalization($data, $format = null): bool
40+
public function supportsNormalization($data, string $format = null): bool
4141
{
4242
return $data instanceof \BackedEnum;
4343
}
@@ -47,7 +47,7 @@ public function supportsNormalization($data, $format = null): bool
4747
*
4848
* @throws NotNormalizableValueException
4949
*/
50-
public function denormalize($data, $type, $format = null, array $context = []): mixed
50+
public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed
5151
{
5252
if (!is_subclass_of($type, \BackedEnum::class)) {
5353
throw new InvalidArgumentException('The data must belong to a backed enumeration.');
@@ -67,7 +67,7 @@ public function denormalize($data, $type, $format = null, array $context = []):
6767
/**
6868
* {@inheritdoc}
6969
*/
70-
public function supportsDenormalization($data, $type, $format = null): bool
70+
public function supportsDenormalization(mixed $data, string $type, string $format = null): bool
7171
{
7272
return is_subclass_of($type, \BackedEnum::class);
7373
}

0 commit comments

Comments
 (0)