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