Skip to content

Commit df61a96

Browse files
committed
Reword
1 parent 40c2a98 commit df61a96

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

service_container/service_decoration.rst

+10-4
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,7 @@ but keeps a reference of the old one as ``.inner``:
128128
The ``#[AsDecorator]`` attribute was introduced in Symfony 6.1.
129129

130130
The ``decorates`` option tells the container that the ``App\DecoratingMailer``
131-
service replaces the ``App\Mailer`` service.
132-
:ref:`Service tags<How to Work with Service Tags> are moved as well.
133-
If you're using the
131+
service replaces the ``App\Mailer`` service. If you're using the
134132
:ref:`default services.yaml configuration <service-container-services-load-example>`,
135133
the decorated service is automatically injected when the constructor of the
136134
decorating service has one argument type-hinted with the decorated service class.
@@ -219,12 +217,20 @@ automatically changed to ``'.inner'``):
219217
Instead, use the
220218
:class:`#[AutowireDecorated] <Symfony\\Component\\DependencyInjection\\Attribute\\AutowireDecorated>` attribute.
221219

222-
.. tip::
220+
.. note::
223221

224222
The visibility of the decorated ``App\Mailer`` service (which is an alias
225223
for the new service) will still be the same as the original ``App\Mailer``
226224
visibility.
227225

226+
.. note::
227+
228+
All custom :ref:`service tags </service_container/tags>`_ from the decorated
229+
service are removed in the new service. Only certain built-in service tags
230+
defined by Symfony are retained: ``container.service_locator``, ``container.service_subscriber``,
231+
``kernel.event_subscriber``, ``kernel.event_listener``, ``kernel.locale_aware``,
232+
and ``kernel.reset``.
233+
228234
.. note::
229235

230236
The generated inner id is based on the id of the decorator service

0 commit comments

Comments
 (0)