Skip to content

Commit dd613a8

Browse files
[DependencyInjection] Exclude referencing service (self) in TaggedIterator
1 parent 740e44f commit dd613a8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

service_container/tags.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,10 +688,20 @@ iterator, add the ``exclude`` option:
688688
;
689689
};
690690
691+
.. note::
692+
693+
In the case the referencing service is itself tagged with the tag being used in the tagged
694+
iterator, it is automatically excluded from the injected iterable.
695+
691696
.. versionadded:: 6.1
692697

693698
The ``exclude`` option was introduced in Symfony 6.1.
694699

700+
.. versionadded:: 6.3
701+
702+
The automatic exclusion of the referencing service in the injected iterable was
703+
introduced in Symfony 6.3.
704+
695705
.. seealso::
696706

697707
See also :doc:`tagged locator services </service_container/service_subscribers_locators>`

0 commit comments

Comments
 (0)