Skip to content

Commit f9901d5

Browse files
committed
bug #5000 Fixed case where service definition is actually an alias (Xavier 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
2 parents 39a1487 + c9caef6 commit f9901d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/dependency_injection/tags.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ custom tag::
133133
{
134134
public function process(ContainerBuilder $container)
135135
{
136-
if (!$container->hasDefinition('acme_mailer.transport_chain')) {
136+
if (!$container->has('acme_mailer.transport_chain')) {
137137
return;
138138
}
139139

140-
$definition = $container->getDefinition(
140+
$definition = $container->findDefinition(
141141
'acme_mailer.transport_chain'
142142
);
143143

0 commit comments

Comments
 (0)