symfony/symfony — pull request #4937 by Burgov (2012-07-15 20:50:29+00:00)
Title: [Frameworkbundle] Tag support in container debug

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: n/a
License of the code: MIT

This PR allows finding all services with a specified tag in the container:

```
> app/console container:debug --tag=form.type
[container] Public services
Service Id Scope Class Name
form.type.birthday container Symfony\Component\Form\Extension\Core\Type\BirthdayType
form.type.checkbox container Symfony\Component\Form\Extension\Core\Type\CheckboxType
form.type.choice container Symfony\Component\Form\Extension\Core\Type\ChoiceType
form.type.collection container Symfony\Component\Form\Extension\Core\Type\CollectionType
form.type.country container Symfony\Component\Form\Extension\Core\Type\CountryType
[ ... ]
```

Also, it adds more info on used tags when requesting info of a service:

Before:

```
> app/console container:debug form.type.birthday
[container] Information for service form.type.birthday

Service Id form.type.birthday
Class Symfony\Component\Form\Extension\Core\Type\BirthdayType
Tags form.type
Scope container
Public yes
Synthetic no
Required File -
```

After:
```
> app/console container:debug form.type.birthday
[container] Information for service form.type.birthday

Service Id form.type.birthday
Class Symfony\Component\Form\Extension\Core\Type\BirthdayType
Tags
- form.type (alias: birthday)
Scope container
Public yes
Synthetic no
Required File -
```