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.
#[AsDecorator]
2 parents 878c3fc + 49d73c0 commit a6cedd8Copy full SHA for a6cedd8
service_container/service_decoration.rst
@@ -123,6 +123,16 @@ but keeps a reference of the old one as ``.inner``:
123
->decorate(Mailer::class);
124
};
125
126
+.. tip::
127
+
128
+ You can apply multiple ``#[AsDecorator]`` attributes to the same class to
129
+ decorate multiple services with it.
130
131
+ .. versionadded:: 7.4
132
133
+ The feature to allow multiple ``#[AsDecorator]`` attributes was introduced
134
+ in Symfony 7.4.
135
136
The ``decorates`` option tells the container that the ``App\DecoratingMailer``
137
service replaces the ``App\Mailer`` service. If you're using the
138
:ref:`default services.yaml configuration <service-container-services-load-example>`,
0 commit comments