-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Hide definitions bearing the container.excluded
tag
#50452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
container.excluded
tagcontainer.excluded
tag
Can you please check if this issue happens on 6.3? We might have fixed this as an improvement already. |
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php
Outdated
Show resolved
Hide resolved
@nicolas-grekas I can confirm this still happens with Symfony 6.3.0 RC2 |
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, maybe just make line breaks consistent 👍
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php
Outdated
Show resolved
Hide resolved
Looks good, thank you for contributing. |
@chalasr, I added tests for |
Thank you @Myks92. |
Normally I test whether the exclusion rules from the service container of my bundles work correctly by just using the
debug:container
command and looking whether my excluded services occur in the last.However, due to the latest changes in #46279 all folders and subfulders (excluded or not) are always in this list.
You need to open the definition to see if it was excluded:

For example,
Command
,Query
,Entity
are folders, but they are specified as services in the container.This PR fixes this problem to ignore definitions bearing the container.excluded tag if those are to be hidden for Descriptors:
JsonDescriptor
,MarkdownDescriptor
,TextDescriptor
andXmlDescriptor
.After fixes problem:
