Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(validation): fix validation exception resource #6204

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 ValidationException} instead
vincentchalamon marked this conversation as resolved.
Show resolved Hide resolved
*/
#[ErrorResource(
uriTemplate: '/validation_errors/{id}',
Expand Down