Skip to content

Improve error message for undefined DIC aliases #16799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Improve error message for undefined DIC aliases #16799

wants to merge 2 commits into from

Conversation

mpdude
Copy link
Contributor

@mpdude mpdude commented Dec 2, 2015

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).

Additionally, I think the arguments need to be the other way round (`templating` is an alias pointing to `templating.engine.twig`).
@@ -45,7 +45,7 @@ public function process(ContainerBuilder $container)
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 name "%s" with actual definition "%s".', $id, $alias), null, $e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"name" is a bit redundant here, alias already implies the name.

@stof
Copy link
Member

stof commented Dec 5, 2015

Thanks for fixing this bug @mpdude.

@stof stof closed this in fbc353d Dec 5, 2015
@mpdude mpdude deleted the patch-1 branch December 5, 2015 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants