Skip to content

Commit

Permalink
bug #5000 Fixed case where service definition is actually an alias (X…
Browse files Browse the repository at this point in the history
…avier Coureau)

This PR was merged into the 2.3 branch.

Discussion
----------

Fixed case where service definition is actually an alias

If `acme_mailer.transport_chain` service would be an alias, the `hasDefinition` method would return `false` and would fake the expected result.
Same for the further call on `getDefinition` method.

Commits
-------

c9caef6 Fixed case where definition service is an alias
  • Loading branch information
weaverryan committed Mar 2, 2015
2 parents 39a1487 + c9caef6 commit f9901d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/dependency_injection/tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ custom tag::
{
public function process(ContainerBuilder $container)
{
if (!$container->hasDefinition('acme_mailer.transport_chain')) {
if (!$container->has('acme_mailer.transport_chain')) {
return;
}

$definition = $container->getDefinition(
$definition = $container->findDefinition(
'acme_mailer.transport_chain'
);

Expand Down

0 comments on commit f9901d5

Please sign in to comment.