Commit 3fc23b6
committed
feature #47311 [FrameworkBundle] Update ContainerDebugCommand to add 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 tagsFile tree
2 files changed
+53
-0
lines changed- Command
- Tests/Functional
2 files changed
+53
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
| |||
281 | 282 | | |
282 | 283 | | |
283 | 284 | | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
284 | 303 | | |
285 | 304 | | |
286 | 305 | | |
| |||
300 | 319 | | |
301 | 320 | | |
302 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
303 | 335 | | |
304 | 336 | | |
305 | 337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
103 | 124 | | |
104 | 125 | | |
105 | 126 | | |
| |||
0 commit comments