Skip to content

Commit f9901d5

Browse files
committed
bug symfony#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

Lines changed: 2 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy