-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[DependencyInjection] Add information about debugging tagged services #17201
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94noni
reviewed
Aug 18, 2022
94noni
reviewed
Aug 18, 2022
fabpot
added a commit
to symfony/symfony
that referenced
this pull request
Aug 29, 2022
…parial search for tags (vshevelev, BOB41K1987) This PR was squashed before being merged into the 6.2 branch. Discussion ---------- [FrameworkBundle] Update ContainerDebugCommand to add parial search for tags | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | | License | MIT | Doc PR | symfony/symfony-docs#17201 As of now, the `debug:container` command allows the use of partial search for the service name but doesn't allow the partial search for `tags`. It can be especially useful when using with `#[AutoconfigureTag]` attribute when the class FQN becomes a tag. ``` namespace App\SomeBundle\SomeService\Inerfaces; use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; #[AutoconfigureTag] interface SomeInterface{} ``` As of now, to find the services tagged with this interface we need to execute `bin/console debug:container --tag=App\\SomeBundle\\SomeService\\Inerfaces\\SomeInterface` which looks a bit overwhelming. This PR allows to search simply by `bin/console debug:container --tag=SomeInterface` which is much simpler. In case there are multiple tags containing the string, the command will allow choosing the one the user is looking for: ``` bin/console debug:container --tag=kernel Select one of the following tags to display its information: [0] kernel.event_listener [1] kernel.event_subscriber [2] kernel.reset [3] kernel.cache_warmer [4] kernel.locale_aware [5] kernel.fragment_renderer [6] kernel.cache_clearer ``` Commits ------- b301d92 [FrameworkBundle] Update ContainerDebugCommand to add parial search for tags
symfony-splitter
pushed a commit
to symfony/framework-bundle
that referenced
this pull request
Aug 29, 2022
…parial search for tags (vshevelev, BOB41K1987) This PR was squashed before being merged into the 6.2 branch. Discussion ---------- [FrameworkBundle] Update ContainerDebugCommand to add parial search for tags | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | | License | MIT | Doc PR | symfony/symfony-docs#17201 As of now, the `debug:container` command allows the use of partial search for the service name but doesn't allow the partial search for `tags`. It can be especially useful when using with `#[AutoconfigureTag]` attribute when the class FQN becomes a tag. ``` namespace App\SomeBundle\SomeService\Inerfaces; use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; #[AutoconfigureTag] interface SomeInterface{} ``` As of now, to find the services tagged with this interface we need to execute `bin/console debug:container --tag=App\\SomeBundle\\SomeService\\Inerfaces\\SomeInterface` which looks a bit overwhelming. This PR allows to search simply by `bin/console debug:container --tag=SomeInterface` which is much simpler. In case there are multiple tags containing the string, the command will allow choosing the one the user is looking for: ``` bin/console debug:container --tag=kernel Select one of the following tags to display its information: [0] kernel.event_listener [1] kernel.event_subscriber [2] kernel.reset [3] kernel.cache_warmer [4] kernel.locale_aware [5] kernel.fragment_renderer [6] kernel.cache_clearer ``` Commits ------- b301d92686 [FrameworkBundle] Update ContainerDebugCommand to add parial search for tags
Thanks Vladimir ... and congrats on your first Symfony Docs contribution 🎉 |
symfony-splitter
pushed a commit
to symfony/framework-bundle
that referenced
this pull request
Jul 28, 2023
…parial search for tags (vshevelev, BOB41K1987) This PR was squashed before being merged into the 6.2 branch. Discussion ---------- [FrameworkBundle] Update ContainerDebugCommand to add parial search for tags | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | | License | MIT | Doc PR | symfony/symfony-docs#17201 As of now, the `debug:container` command allows the use of partial search for the service name but doesn't allow the partial search for `tags`. It can be especially useful when using with `#[AutoconfigureTag]` attribute when the class FQN becomes a tag. ``` namespace App\SomeBundle\SomeService\Inerfaces; use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; #[AutoconfigureTag] interface SomeInterface{} ``` As of now, to find the services tagged with this interface we need to execute `bin/console debug:container --tag=App\\SomeBundle\\SomeService\\Inerfaces\\SomeInterface` which looks a bit overwhelming. This PR allows to search simply by `bin/console debug:container --tag=SomeInterface` which is much simpler. In case there are multiple tags containing the string, the command will allow choosing the one the user is looking for: ``` bin/console debug:container --tag=kernel Select one of the following tags to display its information: [0] kernel.event_listener [1] kernel.event_subscriber [2] kernel.reset [3] kernel.cache_warmer [4] kernel.locale_aware [5] kernel.fragment_renderer [6] kernel.cache_clearer ``` Commits ------- b301d92686 [FrameworkBundle] Update ContainerDebugCommand to add parial search for tags
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add documentations about debugging tagged services using
debug:container --tag