From 8abc20e3441a771b1e63f4792a6f6bf095b7408e Mon Sep 17 00:00:00 2001 From: Alex Savkov Date: Mon, 22 Aug 2016 14:20:25 +0200 Subject: [PATCH] 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 --- service_container/optional_dependencies.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/service_container/optional_dependencies.rst b/service_container/optional_dependencies.rst index cd9a38e28cd..204d5519745 100644 --- a/service_container/optional_dependencies.rst +++ b/service_container/optional_dependencies.rst @@ -76,7 +76,8 @@ call if the service exists and remove the method call if it does not: services: app.newsletter_manager: class: AppBundle\Newsletter\NewsletterManager - arguments: ['@?app.mailer'] + calls: + - [setMailer, ['@?app.mailer']] .. code-block:: xml