Skip to content

Commit

Permalink
bug #20957 [FrameworkBundle] test for the Validator component to be p…
Browse files Browse the repository at this point in the history
…resent (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 | #20949
| License       | MIT
| Doc PR        |

Commits
-------

fb9b083 test for the Validator component to be present
  • Loading branch information
fabpot committed Dec 16, 2016
2 parents 89d5ec0 + fb9b083 commit a2c2d15
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -751,6 +751,10 @@ private function registerValidationConfiguration(array $config, ContainerBuilder
return;
}

if (!class_exists('Symfony\Component\Validator\Validation')) {
throw new LogicException('Validation support cannot be enabled as the Validator component is not installed.');
}

$loader->load('validator.xml');

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

0 comments on commit a2c2d15

Please sign in to comment.