PHPackages                             egulias/tag-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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. egulias/tag-debug-command-bundle

AbandonedSymfony-bundle[PSR &amp; Standards](/categories/psr-standards)

egulias/tag-debug-command-bundle
================================

Symfony 2 console command to debug services tags

1.0.0(11y ago)8191MITPHP

Since Aug 27Pushed 11y ago1 watchersCompare

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

READMEChangelogDependencies (8)Versions (2)Used By (0)

Tag debug Command for Symfony2 console
======================================

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

\[[![Build Status](https://camo.githubusercontent.com/5252a25bda0c9f88ba26d2ac2e6b6d6214cd4548efc282717992f47a83f20eec/68747470733a2f2f7472617669732d63692e6f72672f6567756c6961732f5461674465627567436f6d6d616e6442756e646c652e706e673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/5252a25bda0c9f88ba26d2ac2e6b6d6214cd4548efc282717992f47a83f20eec/68747470733a2f2f7472617669732d63692e6f72672f6567756c6961732f5461674465627567436f6d6d616e6442756e646c652e706e673f6272616e63683d6d6173746572)\] () [![Coverage Status](https://camo.githubusercontent.com/ebff3756b6a4450fb3eab0dde756b013d67e70eaabd8977775756680337462e2/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6567756c6961732f5461674465627567436f6d6d616e6442756e646c652f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/egulias/TagDebugCommandBundle?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/da80a921f8b802c75219588d41bf0e7d44d7bc3b1a2e6f120c143730104418a9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6567756c6961732f5461674465627567436f6d6d616e6442756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/egulias/TagDebugCommandBundle/?branch=master)

This bundle provides a simple command `container:tag-debug` to allow to easily debug tagged services by providing useful information about those defined in the app. It will fetch information about all the tagged services.

You can apply [filters](#available-filters) and define [your own filters](#configure-your-own-filters)

Usage
=====

[](#usage)

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

```
$ php app/console container:tag-debug
```

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

[](#available-options)

- `--show-private`: if issued will show also private services.
- `--filter`: can be many of this. The form is `--filter name=param1,param2` for each filter, where `param` are the parameters for the given filter.

### Available filters

[](#available-filters)

- Name (`name`): Filter by tag name, exact match. Requires one parameter, e.g : `--filter name=tag_name`
- Attribute Name (`attribute_name`): Filter by tag attribute name, exact match. Requires one parameter, e.g : `--filter attribute_name=attr_name`
- Attribute Value (`attribute_value`): Filter by tag attribute value, exact match. Requires two parameters, e.g: `--filter attribute_value=attr_name,attr_value`
- NameRegEx (`name_regex`): Filter by tag name, giving a regular expression. No need to provide a separator (`~` is used internally). Requires one parameter, e.g : `--filter name_regex=regex`

For more information see [TagDebug lib](https://github.com/egulias/TagDebug)

### Sample usage and output

[](#sample-usage-and-output)

#### Sample Filter

[](#sample-filter)

```
$ php app/console sf container:tag-debug --filter name=kernel.event_listener
```

[See a sample output for this command](https://gist.github.com/egulias/143a3c458190f206f730)

#### Two filters, one with multiple values

[](#two-filters-one-with-multiple-values)

```
$ php app/console container:tag-debug
    --filter name=kernel.event_listener
    --filter attribute_value=event,kernel.controller
```

[See a sample output for this command](https://gist.github.com/egulias/4341f7dfc3206cca5ef8)

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

[](#installation-and-configuration)

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

[](#get-the-bundle)

Add to your `composer.json`

Symfony &gt;= 2.3
-----------------

[](#symfony--23)

```
{
    "require": {
        "egulias/tag-debug-command-bundle": "~1.0"
    }
}
```

Use composer to download the new requirement:

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

Add TagDebugCommandBundle to your application kernel
----------------------------------------------------

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

```
