symfony/symfony — pull request #10388 by matthieuauger (2014-03-05 20:12:15+00:00)
Title: [FrameworkBundle] [Command] Event Dispatcher Debug - Display registered listeners

| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | waiting
| Fixed tickets | -
| License | MIT

Hi. In some big applications with lots of events, it's often hard to debug which classes listen to which events, and what is the order of theses listeners. This PR allows to run

- *event-dispatcher:debug* which displays all configured listeners + the events they listen to

![capture d cran de 2014-03-05 20 57 27](https://f.cloud.github.com/assets/1172099/2337709/7677f542-a4a0-11e3-86a9-f4c8f525de93.png)

- *event-dispatcher:debug* **event** which displays configured listeners for this specific event (order by priority desc)

![capture d cran de 2014-03-05 21 01 37](https://f.cloud.github.com/assets/1172099/2337775/ff36131e-a4a0-11e3-930e-1838c2ea4f46.png)

The output is similar to *container:debug* command and is available in all supported formats (txt, xml, json and markdown).

I found another PR with same goal (#8234), but the approach looks too complicated to me plus I think we should fetch the listeners directly with the event_dispatcher.

Any feedbacks welcome