mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-04 04:19:43 +00:00
Add getSupportedTypes method for (de)normalizerInterface implementations
This commit is contained in:
@@ -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 [];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user