PHPackages                             egulias/listeners-debug-command-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. egulias/listeners-debug-command-bundle

ActiveSymfony-bundle[Debugging &amp; Profiling](/categories/debugging)

egulias/listeners-debug-command-bundle
======================================

Symfony 2 console command to debug listeners

3.0.0(11y ago)56822.9k↓24%11[1 PRs](https://github.com/egulias/ListenersDebugCommandBundle/pulls)6MITPHP

Since Jun 30Pushed 9y ago3 watchersCompare

[ Source](https://github.com/egulias/ListenersDebugCommandBundle)[ Packagist](https://packagist.org/packages/egulias/listeners-debug-command-bundle)[ Docs](https://github.com/egulias/ListenersDebugCommandBundle.git)[ RSS](/packages/egulias-listeners-debug-command-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (7)Versions (21)Used By (6)

Listeners debug Command for Symfony2 console [![Build Status](https://camo.githubusercontent.com/a631c345238330501c825884bfac6783edd693cc047f4628350e6a86a54da52e/68747470733a2f2f7472617669732d63692e6f72672f6567756c6961732f4c697374656e6572734465627567436f6d6d616e6442756e646c652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/egulias/ListenersDebugCommandBundle) [![Coverage Status](https://camo.githubusercontent.com/c8e7810e17a7f965f996cfa3f058dd0e68ae056d9e88e4bbc598387baa2fce1f/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6567756c6961732f4c697374656e6572734465627567436f6d6d616e6442756e646c652f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/egulias/ListenersDebugCommandBundle?branch=master) [![SensioLabsInsight](https://camo.githubusercontent.com/656444380977a731f3bd87bf9d1d2ec87ff635df0a0a78b9ce8baefc63633ee6/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f36323962336339662d663537632d343566642d626137322d6534376662646661623736392f6d696e692e706e67)](https://insight.sensiolabs.com/projects/629b3c9f-f57c-45fd-ba72-e47fbdfab769)
===========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#listeners-debug-command-for-symfony2-console---)

This bundle provides a simple command `container:debug:listeners` to allow to easily debug listeners by providing useful information about those defined in the app. It will fetch information about all the listeners tagged with .event\_listener

IMPORTANT
---------

[](#important)

### Symfony 2.2.X

[](#symfony-22x)

If you are using this from Symfony &lt;= 2.2, please update your composer.json file to use version=1.4.1 which is the current stable branch for Symfony 2.2.x

### Symfony 2.0.X

[](#symfony-20x)

If you are using this from Symfony 2.0.x, please update your deps file to use version=symfony2.0.x which is the current stable branch for Symfony 2.0.x

Usage
=====

[](#usage)

As for any command you should use: `app/console` from your project root. The command is: `app/console container:debug:listeners`

Available options
-----------------

[](#available-options)

There are 4 available options:

- --show-private : if issued will show also private services
- --event=event.name: if issued will filter to show only the listeners listening to the given name (ordered by descending priority)
- --order-asc: in combination with --event orders them by ascending priority
- --listeners: if issued will filter to show only the listeners (only available since Symfony 2.1.x)
- --subscribers: if issued will filter to show only the subscribers (only available since Symfony 2.1.x)

Sample output (Symfony &gt;= 2.3)
---------------------------------

[](#sample-output-symfony--23)

- Output for `container:debug:listeners` [Here](https://gist.github.com/egulias/5862768)
- Output for `container:debug:listeners --event=kernel.response` [Here](https://gist.github.com/egulias/5862796)
- Output for `container:debug:listeners listener.id` [Here](https://gist.github.com/egulias/3132499)
- Output for `container:debug:listeners --listeners` [Here](https://gist.github.com/egulias/5862815)
- Output for `container:debug:listeners --subscribers` [Here](https://gist.github.com/egulias/5862829)

Sample output (Symfony &gt;= 2.1.x &lt;= 2.2.x)
-----------------------------------------------

[](#sample-output-symfony--21x--22x)

- Output for `container:debug:listeners` [Here](https://gist.github.com/3132219)
- Output for `container:debug:listeners --event=kernel.response` [Here](https://gist.github.com/3132227)
- Output for `container:debug:listeners listener.id` [Here](https://gist.github.com/3132499)
- Output for `container:debug:listeners --listeners` [Here](https://gist.github.com/3160841)
- Output for `container:debug:listeners --subscribers` [Here](https://gist.github.com/3160836)

Sample output (Symfony 2.0.x)
-----------------------------

[](#sample-output-symfony-20x)

- Output for `container:debug:listeners` [Here](https://gist.github.com/3077494)
- Output for `container:debug:listeners --event=kernel.request` [Here](https://gist.github.com/3077506)
- Output for `container:debug:listeners listener.id` [Here](https://gist.github.com/3077521)

Installation and configuration
==============================

[](#installation-and-configuration)

Get the bundle
--------------

[](#get-the-bundle)

Add to your composer.json

\##Symfony &gt;= 2.3

```
{
    "require": {
        "egulias/listeners-debug-command-bundle": "1.9.0"
    }
}

```

\##Symfony &gt;= 2.2

```
{
    "require": {
        "egulias/listeners-debug-command-bundle": "symfony2.2"
    }
}

```

Use composer to download the new requirement

```
$ php composer.phar update egulias/listeners-debug-command-bundle

```

Add ListenersDebugCommandBundle to your application kernel
----------------------------------------------------------

[](#add-listenersdebugcommandbundle-to-your-application-kernel)

```
