From 9e629f78b25ee934d2b6180d4a2aaca238e89bff Mon Sep 17 00:00:00 2001 From: tcoch Date: Thu, 11 Dec 2025 10:50:51 +0100 Subject: [PATCH 1/2] Add an example for Exclude attribute --- service_container.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/service_container.rst b/service_container.rst index f94b15233c3..503a30a6b4a 100644 --- a/service_container.rst +++ b/service_container.rst @@ -1309,6 +1309,17 @@ key. For example, the default Symfony configuration contains this: may use the :class:`Symfony\\Component\\DependencyInjection\\Attribute\\Exclude` attribute directly on your class to exclude it. + .. code-block:: php + + // src/Service/SomeService.php + namespace App\Service; + + #[Exclude] + class SomeService + { + // ... + } + .. versionadded:: 6.3 The :class:`Symfony\\Component\\DependencyInjection\\Attribute\\Exclude` From f3a8ada64439c38723b984881fc98da608b3d7cb Mon Sep 17 00:00:00 2001 From: tcoch Date: Thu, 11 Dec 2025 11:19:56 +0100 Subject: [PATCH 2/2] Fix code-block DOCtor-RST lint issue --- service_container.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service_container.rst b/service_container.rst index 503a30a6b4a..4cdd447e7da 100644 --- a/service_container.rst +++ b/service_container.rst @@ -1309,7 +1309,7 @@ key. For example, the default Symfony configuration contains this: may use the :class:`Symfony\\Component\\DependencyInjection\\Attribute\\Exclude` attribute directly on your class to exclude it. - .. code-block:: php + :: // src/Service/SomeService.php namespace App\Service;