Add getSupportedTypes method for (de)normalizerInterface implementations

This commit is contained in:
2025-05-26 11:21:59 +02:00
parent 17db59d221
commit 6e21f2688f
34 changed files with 277 additions and 2 deletions

View File

@@ -122,4 +122,15 @@ class UserNormalizer implements \Symfony\Component\Serializer\Normalizer\Normali
return false;
}
public function getSupportedTypes(?string $format): array
{
if ('json' === $format || 'docgen' === $format) {
return [
User::class => true,
];
}
return [];
}
}