We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89e5c4f commit 0b2d9baCopy full SHA for 0b2d9ba
service_container/optional_dependencies.rst
@@ -116,6 +116,12 @@ call if the service exists and remove the method call if it does not:
116
))
117
;
118
119
+.. note::
120
+
121
+ If the argument to the method call is a collection of arguments and any of
122
+ them is missing, those elements are removed but the method call is still
123
+ made with the remaining elements of the collection.
124
125
In YAML, the special ``@?`` syntax tells the service container that the dependency
126
is optional. Of course, the ``NewsletterManager`` must also be rewritten by
127
adding a ``setMailer()`` method::
0 commit comments