bug #16799 Improve error message for undefined DIC aliases (mpdude)
This PR was squashed before being merged into the 2.3 branch (closes #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
This commit is contained in:
commit
fbc353dcda
@ -45,7 +45,7 @@ class ReplaceAliasByActualDefinitionPass implements CompilerPassInterface
|
||||
try {
|
||||
$definition = $container->getDefinition($aliasId);
|
||||
} catch (InvalidArgumentException $e) {
|
||||
throw new InvalidArgumentException(sprintf('Unable to replace alias "%s" with "%s".', $alias, $id), null, $e);
|
||||
throw new InvalidArgumentException(sprintf('Unable to replace alias "%s" with actual definition "%s".', $id, $alias), null, $e);
|
||||
}
|
||||
|
||||
if ($definition->isPublic()) {
|
||||
|
Reference in New Issue
Block a user