Skip to content

Commit fbc353d

Browse files
committed
bug symfony#16799 Improve error message for undefined DIC aliases (mpdude)
This PR was squashed before being merged into the 2.3 branch (closes symfony#16799). Discussion ---------- Improve error message for undefined DIC aliases | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | n/a Additionally, I think the arguments need to be the other way round (`templating` is an alias pointing to `templating.engine.twig`). Commits ------- 9195cd3 Improve error message for undefined DIC aliases
2 parents 8ab107c + 9195cd3 commit fbc353d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function process(ContainerBuilder $container)
4545
try {
4646
$definition = $container->getDefinition($aliasId);
4747
} catch (InvalidArgumentException $e) {
48-
throw new InvalidArgumentException(sprintf('Unable to replace alias "%s" with "%s".', $alias, $id), null, $e);
48+
throw new InvalidArgumentException(sprintf('Unable to replace alias "%s" with actual definition "%s".', $id, $alias), null, $e);
4949
}
5050

5151
if ($definition->isPublic()) {

0 commit comments

Comments
 (0)