Skip to content

Commit fb9b083

Browse files
committed
test for the Validator component to be present
1 parent 89d5ec0 commit fb9b083

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)