From b1dad841a7dcc2e1bd13b8d4917a2612c595796e Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Tue, 5 Mar 2024 20:45:05 +0100 Subject: [PATCH] fix(validation): fix validation exception resource --- .../Bundle/DependencyInjection/ApiPlatformExtension.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php b/src/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php index 445541333e..d4995536fc 100644 --- a/src/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php +++ b/src/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php @@ -45,9 +45,10 @@ use ApiPlatform\Symfony\EventListener\AddTagsListener; use ApiPlatform\Symfony\EventListener\DenyAccessListener; use ApiPlatform\Symfony\GraphQl\Resolver\Factory\DataCollectorResolverFactory; -use ApiPlatform\Symfony\Validator\Exception\ValidationException; +use ApiPlatform\Symfony\Validator\Exception\ValidationException as SymfonyValidationException; use ApiPlatform\Symfony\Validator\Metadata\Property\Restriction\PropertySchemaRestrictionMetadataInterface; use ApiPlatform\Symfony\Validator\ValidationGroupsGeneratorInterface; +use ApiPlatform\Validator\Exception\ValidationException; use Doctrine\Persistence\ManagerRegistry; use phpDocumentor\Reflection\DocBlockFactoryInterface; use PHPStan\PhpDocParser\Parser\PhpDocParser; @@ -373,6 +374,7 @@ private function getClassNameResources(): array { return [ Error::class, + SymfonyValidationException::class, ValidationException::class, ]; }