diff --git a/service_container/shared.rst b/service_container/shared.rst index 435822fb25c..ea12de568d4 100644 --- a/service_container/shared.rst +++ b/service_container/shared.rst @@ -11,6 +11,19 @@ in your service definition: .. configuration-block:: + .. code-block:: php-attributes + + // src/SomeNonSharedService.php + namespace App; + + use Symfony\Component\DependencyInjection\Attribute\Autoconfigure; + + #[Autoconfigure(shared: false)] + class SomeNonSharedService + { + // ... + } + .. code-block:: yaml # config/services.yaml