Skip to content

Commit 0e82f5f

Browse files
committed
Fix GreetingNormalizer::normalize
`Compile Error: Declaration of App\Rest\Serializer\GreetingNormalizer::normalize(mixed $object, ?string $format = null, array $context = []): mixed must be compatible with Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize(mixed $data, ?string $format = null, array $context = []): ArrayObject|array|string|int|float|bool|null`
1 parent c75a1ab commit 0e82f5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code_samples/api/rest_api/src/Rest/Serializer/GreetingNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function supportsNormalization(mixed $data, ?string $format = null)
1717
}
1818

1919
/** @param \App\Rest\Values\Greeting $object */
20-
public function normalize(mixed $object, ?string $format = null, array $context = []): mixed
20+
public function normalize(mixed $object, ?string $format = null, array $context = []): array|\ArrayObject|bool|float|int|null|string
2121
{
2222
$data = [
2323
'Salutation' => $object->salutation,

0 commit comments

Comments
 (0)