Skip to content

Commit a2c2d15

Browse files
committed
bug symfony#20957 [FrameworkBundle] test for the Validator component to be present (xabbuh)
This PR was merged into the 2.7 branch. Discussion ---------- [FrameworkBundle] test for the Validator component to be present | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#20949 | License | MIT | Doc PR | Commits ------- fb9b083 test for the Validator component to be present
2 parents 89d5ec0 + fb9b083 commit a2c2d15

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,10 @@ private function registerValidationConfiguration(array $config, ContainerBuilder
751751
return;
752752
}
753753

754+
if (!class_exists('Symfony\Component\Validator\Validation')) {
755+
throw new LogicException('Validation support cannot be enabled as the Validator component is not installed.');
756+
}
757+
754758
$loader->load('validator.xml');
755759

756760
$validatorBuilder = $container->getDefinition('validator.builder');

0 commit comments

Comments
 (0)