From b565f01debb9eecf6632a1344526616e90852334 Mon Sep 17 00:00:00 2001 From: Maxim Smakouz Date: Mon, 4 Dec 2023 17:26:19 +0200 Subject: [PATCH] Add Symfony 7.0 support --- composer.json | 4 ++-- src/Bootloader/ValidatorBootloader.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 8b6f05c..38508a6 100644 --- a/composer.json +++ b/composer.json @@ -20,9 +20,9 @@ "spiral/filters": "^3.1", "spiral/validation": "^3.1", "doctrine/annotations": "^1.13 || ^2.0", - "symfony/cache": "^6.0", + "symfony/cache": "^6.4 || ^7.0", "symfony/psr-http-message-bridge": "^2", - "symfony/validator": "^6.0", + "symfony/validator": "^6.4 || ^7.0", "spiral/attributes": "^2.8 || ^3.0", "spiral/http": "^3.1" }, diff --git a/src/Bootloader/ValidatorBootloader.php b/src/Bootloader/ValidatorBootloader.php index dea32e5..9d88e89 100644 --- a/src/Bootloader/ValidatorBootloader.php +++ b/src/Bootloader/ValidatorBootloader.php @@ -55,7 +55,7 @@ public function boot(ValidationProvider $provider, ValidationBootloader $validat private function initSymfonyValidator(ConstraintValidatorFactoryInterface $validatorFactory): ValidatorInterface { return \Symfony\Component\Validator\Validation::createValidatorBuilder() - ->enableAnnotationMapping() + ->enableAttributeMapping() ->setConstraintValidatorFactory($validatorFactory) ->getValidator(); }