Skip to content

Commit 282d0fc

Browse files
Alex Savkovxabbuh
Alex Savkov
authored andcommitted
Change example of ignoring dependencies for yaml
Change constructor injection to setter injection (the same as in examples for xml and php), so it is clear what method call is ignored
1 parent 1a387be commit 282d0fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

service_container/optional_dependencies.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ call if the service exists and remove the method call if it does not:
7676
services:
7777
app.newsletter_manager:
7878
class: AppBundle\Newsletter\NewsletterManager
79-
arguments: ['@?app.mailer']
79+
calls:
80+
- [setMailer, ['@?app.mailer']]
8081
8182
.. code-block:: xml
8283

0 commit comments

Comments
 (0)