Skip to content

Commit b589c82

Browse files
committed
feature #17709 [DependencyInjection] Exclude referencing service (self) in TaggedIterator (alexandre-daubois)
This PR was merged into the 6.3 branch. Discussion ---------- [DependencyInjection] Exclude referencing service (self) in `TaggedIterator` Closes #17656 Commits ------- dd613a8 [DependencyInjection] Exclude referencing service (self) in `TaggedIterator`
2 parents 6eaadeb + dd613a8 commit b589c82

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
@@ -707,10 +707,20 @@ iterator, add the ``exclude`` option:
707707
;
708708
};
709709
710+
.. note::
711+
712+
In the case the referencing service is itself tagged with the tag being used in the tagged
713+
iterator, it is automatically excluded from the injected iterable.
714+
710715
.. versionadded:: 6.1
711716

712717
The ``exclude`` option was introduced in Symfony 6.1.
713718

719+
.. versionadded:: 6.3
720+
721+
The automatic exclusion of the referencing service in the injected iterable was
722+
introduced in Symfony 6.3.
723+
714724
.. seealso::
715725

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

0 commit comments

Comments
 (0)