Skip to content

Commit

Permalink
bug #51799 [FrameworkBundle] Remove `validator.expression_language_pr…
Browse files Browse the repository at this point in the history
…ovider` when expression language isn't installed (HypeMC)

This PR was merged into the 6.4 branch.

Discussion
----------

[FrameworkBundle] Remove `validator.expression_language_provider` when expression language isn't installed

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #51796
| License       | MIT

The `validator.expression_language_provider` service should be removed when the expression language component isn't installed.

Commits
-------

b30cdad [FrameworkBundle] Remove `ExpressionLanguageProvider` when expression language isn't installed
  • Loading branch information
nicolas-grekas committed Oct 2, 2023
2 parents a257327 + b30cdad commit b3c91c2
Showing 1 changed file with 2 additions and 3 deletions.
Expand Up @@ -1690,9 +1690,8 @@ private function registerValidationConfiguration(array $config, ContainerBuilder

if (!class_exists(ExpressionLanguage::class)) {
$container->removeDefinition('validator.expression_language');
}

if (!class_exists(ExpressionLanguageProvider::class)) {
$container->removeDefinition('validator.expression_language_provider');
} elseif (!class_exists(ExpressionLanguageProvider::class)) {
$container->removeDefinition('validator.expression_language_provider');
}
}
Expand Down

0 comments on commit b3c91c2

Please sign in to comment.