Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commiteab90ef

Browse files
committed
modify definitions only if the do exist
If the `TranslatorPass` is used an application without the Consolecomponent, the commands will not be registered. Thus, their servicedefinitions must not be modified.
1 parenta19d1e5 commiteab90ef

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎src/Symfony/Component/Translation/DependencyInjection/TranslatorPass.php‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,15 @@ public function process(ContainerBuilder $container)
8080
->replaceArgument(3,$loaders)
8181
;
8282

83-
if ($container->hasParameter('twig.default_path')) {
83+
if (!$container->hasParameter('twig.default_path')) {
84+
return;
85+
}
86+
87+
if ($container->hasDefinition($this->debugCommandServiceId)) {
8488
$container->getDefinition($this->debugCommandServiceId)->replaceArgument(4,$container->getParameter('twig.default_path'));
89+
}
90+
91+
if ($container->hasDefinition($this->updateCommandServiceId)) {
8592
$container->getDefinition($this->updateCommandServiceId)->replaceArgument(5,$container->getParameter('twig.default_path'));
8693
}
8794
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp