Skip to content

Commit 79768b2

Browse files
bug #41472 [Validator] remove service if its class doesn't exist (xabbuh)
This PR was merged into the 5.3 branch. Discussion ---------- [Validator] remove service if its class doesn't exist | Q | A | ------------- | --- | Branch? | 5.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #41468 | License | MIT | Doc PR | Commits ------- fbc689363a remove service if its class doesn't exist
2 parents 6e50d47 + 7add505 commit 79768b2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,6 +1450,10 @@ private function registerValidationConfiguration(array $config, ContainerBuilder
14501450
->setArgument(2, $config['not_compromised_password']['enabled'])
14511451
->setArgument(3, $config['not_compromised_password']['endpoint'])
14521452
;
1453+
1454+
if (!class_exists(ExpressionLanguage::class)) {
1455+
$container->removeDefinition('validator.expression_language');
1456+
}
14531457
}
14541458

14551459
private function registerValidatorMapping(ContainerBuilder $container, array $config, array &$files)

0 commit comments

Comments
 (0)