Skip to content

Commit

Permalink
fix(validation): move validation exception resource (#6204)
Browse files Browse the repository at this point in the history
* fix(validation): fix validation exception resource

* Update src/Symfony/Validator/Exception/ValidationException.php

Co-authored-by: Antoine Bluchet <soyuka@users.noreply.github.com>

---------

Co-authored-by: Antoine Bluchet <soyuka@users.noreply.github.com>
  • Loading branch information
vincentchalamon and soyuka committed Mar 7, 2024
1 parent 54638d3 commit dad8b7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -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;
Expand Down Expand Up @@ -373,6 +374,7 @@ private function getClassNameResources(): array
{
return [
Error::class,
SymfonyValidationException::class,
ValidationException::class,
];
}
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Validator/Exception/ValidationException.php
Expand Up @@ -27,6 +27,8 @@
* Thrown when a validation error occurs.
*
* @author Kévin Dunglas <dunglas@gmail.com>
*
* @deprecated since API Platform 3.3, use {@see BaseValidationException} instead
*/
#[ErrorResource(
uriTemplate: '/validation_errors/{id}',
Expand Down

0 comments on commit dad8b7d

Please sign in to comment.