Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions service_container.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've noticed some other attributes on this page are documented this way too but, shouldn't we use .. code-block:: php-attributes as a part of configuration-block above ? In order to remain consistent with what is done elsewhere in the documentation and to reduce page's length

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to replace .. code-block:: php-attributes by ::actually because of the CI (see commit f3a8ada)


// src/Service/SomeService.php
namespace App\Service;

#[Exclude]
class SomeService
{
// ...
}

.. versionadded:: 6.3

The :class:`Symfony\\Component\\DependencyInjection\\Attribute\\Exclude`
Expand Down