Skip to content

Conversation

@tcoch
Copy link
Contributor

@tcoch tcoch commented Dec 11, 2025

I'd like to propose to add a basic example for the #[Exclude] attribute.
It is not mandatory for understanding, but it will help finding the related documentation (exclude being too much of a generic word, it's not easy to find by a search).

@carsonbot carsonbot added this to the 6.4 milestone Dec 11, 2025
@carsonbot carsonbot changed the title Add example for #[Exclude] attribute Add example for #[Exclude] attribute Dec 11, 2025
@tcoch tcoch changed the title Add example for #[Exclude] attribute [DependencyInjection] Add example for #[Exclude] attribute Dec 11, 2025
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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants