Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6693104

Browse files
minor #32677 [FrameworkBundle] ignore not existing translator service (xabbuh)
This PR was merged into the 4.2 branch. Discussion ---------- [FrameworkBundle] ignore not existing translator service | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 12bf0b0 ignore not existing translator service
2 parents 9451217 + 12bf0b0 commit 6693104

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ private function registerValidationConfiguration(array $config, ContainerBuilder
11221122

11231123
if (interface_exists(TranslatorInterface::class) && class_exists(LegacyTranslatorProxy::class)) {
11241124
$calls = $validatorBuilder->getMethodCalls();
1125-
$calls[1] = ['setTranslator', [new Definition(LegacyTranslatorProxy::class, [new Reference('translator')])]];
1125+
$calls[1] = ['setTranslator', [new Definition(LegacyTranslatorProxy::class, [new Reference('translator', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)])]];
11261126
$validatorBuilder->setMethodCalls($calls);
11271127
}
11281128

0 commit comments

Comments
 (0)