Skip to content

Commit dc2d048

Browse files
committed
[DependencyInjection] Warns instanceof should be called before services registration
1 parent 597a955 commit dc2d048

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

service_container/tags.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@ If you want to apply tags automatically for your own services, use the
113113
->tag('app.custom_tag');
114114
};
115115
116+
.. caution::
117+
118+
If you're using PHP, you need to call ``instanceof`` before any service
119+
registration to make sure tags are correctly applied.
120+
116121
It is also possible to use the ``#[AutoconfigureTag]`` attribute directly on the
117122
base class or interface::
118123

0 commit comments

Comments
 (0)