From 0709b35e5e3c5ce70c581c3cedd9053468a1a90a Mon Sep 17 00:00:00 2001 From: HypeMC Date: Tue, 2 Dec 2025 00:25:53 +0100 Subject: [PATCH] [DependencyInjection] `#[AutoconfigureTag]` can be used without tag name --- service_container/tags.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/service_container/tags.rst b/service_container/tags.rst index f905ed1895e..853c53577c4 100644 --- a/service_container/tags.rst +++ b/service_container/tags.rst @@ -131,6 +131,16 @@ base class or interface:: // ... } +When no tag name is specified, the fully qualified class name (FQCN) of the target is used:: + + // src/Security/CustomInterface.php + + #[AutoconfigureTag] // equivalent to #[AutoconfigureTag(self::class)] + interface CustomInterface + { + // ... + } + .. tip:: If you need more capabilities to autoconfigure instances of your base class