Skip to content

Commit 9e629f7

Browse files
committed
Add an example for Exclude attribute
1 parent 9e285d6 commit 9e629f7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

service_container.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,6 +1309,17 @@ key. For example, the default Symfony configuration contains this:
13091309
may use the :class:`Symfony\\Component\\DependencyInjection\\Attribute\\Exclude`
13101310
attribute directly on your class to exclude it.
13111311

1312+
.. code-block:: php
1313+
1314+
// src/Service/SomeService.php
1315+
namespace App\Service;
1316+
1317+
#[Exclude]
1318+
class SomeService
1319+
{
1320+
// ...
1321+
}
1322+
13121323
.. versionadded:: 6.3
13131324

13141325
The :class:`Symfony\\Component\\DependencyInjection\\Attribute\\Exclude`

0 commit comments

Comments
 (0)