Skip to content

Commit 33c2d1a

Browse files
committed
Merge branch '7.4' into 8.0
* 7.4: minor [DependencyInjection] Allow multiple #[AsDecorator] attributes
2 parents 4d69ef4 + b26d147 commit 33c2d1a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

service_container/service_decoration.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,16 @@ but keeps a reference of the old one as ``.inner``:
123123
->decorate(Mailer::class);
124124
};
125125
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 possibility to allow multiple ``#[AsDecorator]`` attributes was
134+
introduced in Symfony 7.4.
135+
126136
The ``decorates`` option tells the container that the ``App\DecoratingMailer``
127137
service replaces the ``App\Mailer`` service. If you're using the
128138
:ref:`default services.yaml configuration <service-container-services-load-example>`,

0 commit comments

Comments
 (0)