File tree 1 file changed +8
-5
lines changed
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``:
52
52
# In case the dependency is optional
53
53
# arguments: [!service_closure '@?mailer']
54
54
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']
59
58
60
- # It also works when the dependency is optional
59
+ # the shortcut also works for optional dependencies
61
60
# arguments: ['@>?mailer']
62
61
63
62
.. code-block :: xml
@@ -98,6 +97,10 @@ argument of type ``service_closure``:
98
97
// ->args([service_closure('mailer')->ignoreOnInvalid()]);
99
98
};
100
99
100
+ .. versionadded :: 7.3
101
+
102
+ The ``@> `` shortcut syntax for YAML was introduced in Symfony 7.3.
103
+
101
104
.. seealso ::
102
105
103
106
Service closures can be injected :ref: `by using autowiring <autowiring_closures >`
You can’t perform that action at this time.
0 commit comments