Skip to content

Commit 2ebd072

Browse files
committed
minor #7910 Update optional_dependencies.rst (javihgil)
This PR was submitted for the 3.2 branch but it was merged into the 2.7 branch instead (closes #7910). Discussion ---------- Update optional_dependencies.rst Update injected service name according to the previous service definition "app.mailer" instead of "my_mailer" in XML and PHP blocks. Commits ------- eb36653 Update optional_dependencies.rst
2 parents a2cf43a + eb36653 commit 2ebd072

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

service_container/optional_dependencies.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ call if the service exists and remove the method call if it does not:
9191
9292
<service id="app.newsletter_manager" class="AppBundle\Newsletter\NewsletterManager">
9393
<call method="setMailer">
94-
<argument type="service" id="my_mailer" on-invalid="ignore"/>
94+
<argument type="service" id="app.mailer" on-invalid="ignore"/>
9595
</call>
9696
</service>
9797
</services>
@@ -110,7 +110,7 @@ call if the service exists and remove the method call if it does not:
110110
->register('app.newsletter_manager', NewsletterManager::class)
111111
->addMethodCall('setMailer', array(
112112
new Reference(
113-
'my_mailer',
113+
'app.mailer',
114114
ContainerInterface::IGNORE_ON_INVALID_REFERENCE
115115
),
116116
))

0 commit comments

Comments
 (0)