Skip to content

Commit db00c9a

Browse files
committed
Add tip
1 parent f2817d0 commit db00c9a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

service_container/service_decoration.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,4 +421,11 @@ Three different behaviors are available:
421421
}
422422
}
423423

424+
.. tip::
425+
426+
Sometimes, you may want to add a compiler pass that creates service
427+
definitions on the fly. If you want to decorate such a service,
428+
be sure that your compiler pass is registered with ``PassConfig::TYPE_BEFORE_OPTIMIZATION``
429+
type so that the decoration pass will be able to find created services.
430+
424431
.. _`Decorator pattern`: https://en.wikipedia.org/wiki/Decorator_pattern

0 commit comments

Comments
 (0)