Skip to content

Commit

Permalink
[DependencyInjection] Warns instanceof should be called before serv…
Browse files Browse the repository at this point in the history
…ices registration
  • Loading branch information
MatTheCat committed Sep 6, 2023
1 parent 597a955 commit dc2d048
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions service_container/tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ If you want to apply tags automatically for your own services, use the
->tag('app.custom_tag');
};
.. caution::

If you're using PHP, you need to call ``instanceof`` before any service
registration to make sure tags are correctly applied.

It is also possible to use the ``#[AutoconfigureTag]`` attribute directly on the
base class or interface::

Expand Down

0 comments on commit dc2d048

Please sign in to comment.