File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -52,12 +52,11 @@ argument of type ``service_closure``:
5252 # In case the dependency is optional
5353 # arguments: [!service_closure '@?mailer']
5454
55- .. versionadded :: 7.3
56-
57- # A shorthand is available
58- # arguments: ['@>mailer']
55+ # you can also use the special '@>' syntax as a shortcut of '!service_closure'
56+ App\Service\AnotherService :
57+ arguments : ['@>mailer']
5958
60- # It also works when the dependency is optional
59+ # the shortcut also works for optional dependencies
6160 # arguments: ['@>?mailer']
6261
6362 .. code-block :: xml
@@ -98,6 +97,10 @@ argument of type ``service_closure``:
9897 // ->args([service_closure('mailer')->ignoreOnInvalid()]);
9998 };
10099
100+ .. versionadded :: 7.3
101+
102+ The ``@> `` shortcut syntax for YAML was introduced in Symfony 7.3.
103+
101104.. seealso ::
102105
103106 Service closures can be injected :ref: `by using autowiring <autowiring_closures >`
You can’t perform that action at this time.
0 commit comments