Skip to content
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

Hide definitions bearing the container.excluded tag #50452

Merged
merged 1 commit into from
May 29, 2023
Merged

Hide definitions bearing the container.excluded tag #50452

merged 1 commit into from
May 29, 2023

Conversation

Myks92
Copy link
Contributor

@Myks92 Myks92 commented May 27, 2023

Q A
Branch? 6.2
Bug fix? yes
New feature? no
Depreciation?
Tickets Fix #50417
License MIT
Doc PR -

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:
Service Container

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 and XmlDescriptor.

After fixes problem:
Снимок экрана 2023-05-27 в 17 03 19

@carsonbot
Copy link

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:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 6.4 branch.

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!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@Myks92 Myks92 changed the title Ignore definitions bearing the container.excluded tag Hide definitions bearing the container.excluded tag May 27, 2023
@nicolas-grekas
Copy link
Member

Can you please check if this issue happens on 6.3? We might have fixed this as an improvement already.

@MatTheCat
Copy link
Contributor

@nicolas-grekas I can confirm this still happens with Symfony 6.3.0 RC2

@Myks92 Myks92 requested a review from MatTheCat May 28, 2023 19:14
Copy link
Contributor

@MatTheCat MatTheCat left a 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 👍

@chalasr
Copy link
Member

chalasr commented May 28, 2023

Looks good, thank you for contributing.
Can you have a look ContainerDebugCommandTest and see if you can add a test to prevent future regressions?

@Myks92
Copy link
Contributor Author

Myks92 commented May 29, 2023

@chalasr, I added tests for Descriptor and ContainerDebugCommand. Is that what you need?

@chalasr
Copy link
Member

chalasr commented May 29, 2023

Thank you @Myks92.

@chalasr chalasr merged commit 4f2b5e1 into symfony:6.2 May 29, 2023
8 of 9 checks passed
@Myks92 Myks92 deleted the fix-contaier-debug branch May 29, 2023 08:48
@fabpot fabpot mentioned this pull request May 30, 2023
@fabpot fabpot mentioned this pull request Jun 26, 2023
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.

None yet

6 participants