Skip to content

Commit 6005884

Browse files
committed
call method with Translator component only
1 parent 87aef69 commit 6005884

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ private function registerValidationConfiguration(array $config, ContainerBuilder
11081108

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

1111-
if (class_exists(LegacyTranslatorProxy::class)) {
1111+
if (class_exists(Translator::class) && class_exists(LegacyTranslatorProxy::class)) {
11121112
$calls = $validatorBuilder->getMethodCalls();
11131113
$calls[1] = ['setTranslator', [new Definition(LegacyTranslatorProxy::class, [new Reference('translator')])]];
11141114
$validatorBuilder->setMethodCalls($calls);

0 commit comments

Comments
 (0)