Skip to content

Commit 0c0fd35

Browse files
committed
[FrameworkBundle] Fix enable_annotations wrong check for validation config
1 parent cbe8436 commit 0c0fd35

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,10 +1437,6 @@ private function registerValidationConfiguration(array $config, ContainerBuilder
14371437
$definition->replaceArgument(0, $config['email_validation_mode']);
14381438

14391439
if (\array_key_exists('enable_annotations', $config) && $config['enable_annotations']) {
1440-
if (!$this->annotationsConfigEnabled) {
1441-
throw new \LogicException('"enable_annotations" on the validator cannot be set as the PHP version is lower than 8 and Doctrine Annotations support is disabled. Consider upgrading PHP.');
1442-
}
1443-
14441440
$validatorBuilder->addMethodCall('enableAnnotationMapping', [true]);
14451441
if ($this->annotationsConfigEnabled) {
14461442
$validatorBuilder->addMethodCall('setDoctrineAnnotationReader', [new Reference('annotation_reader')]);

0 commit comments

Comments
 (0)