PHPackages                             braincrafted/symfony2cs-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. braincrafted/symfony2cs-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

braincrafted/symfony2cs-bundle
==============================

v0.2.1(11y ago)344MITPHP

Since Oct 10Pushed 11y ago1 watchersCompare

[ Source](https://github.com/braincrafted/symfony2cs-bundle)[ Packagist](https://packagist.org/packages/braincrafted/symfony2cs-bundle)[ RSS](/packages/braincrafted-symfony2cs-bundle/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (2)Dependencies (2)Versions (7)Used By (0)

BraincraftedSymfony2CSBundle
============================

[](#braincraftedsymfony2csbundle)

Unfortunately [PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) does not contain the [Symfony2 coding standard](https://github.com/florianeckerstorfer/Symfony2-coding-standard) and is not extensible. If you want to install PHP\_CodeSniffer using Composer you have to install the coding standard manually everytime PHP\_CodeSniffer is updated. Until now.

Author
------

[](#author)

- [Florian Eckerstorfer](https://florian.ec) ([Twitter](https://twitter.com/Florian_))
- Get updates on my open source projects by following [@braincrafted](https://twitter.com/braincrafted) on Twitter.

Compatiblity
------------

[](#compatiblity)

  BraincraftedSymfony2CSBundleSymfony   `0.1.*``2.3.*`   `0.2.*``2.4.*`   `master``2.4.*` Installation
------------

[](#installation)

First you have to add the bundle to your `composer.json`:

```
{
    "require": {
        "braincrafted/symfony2cs-bundle": "dev-master"
    }
}
```

Next you have to add the bundle to your `AppKernel.php`:

```
// AppKernel.php

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Braincrafted\Bundle\Symfony2CSBundle\BraincraftedSymfony2CSBundle(),
        );

        // ...

        return $bundles;
    }
}
```

You can now execute the `braincrafted:symfony2cs:install` command to install the Symfony2 coding standard:

```
$ php app/console braincrafted:symfony2cs:install
```

However, things get better if you add the script handler that is included in the bundle to the `post-install-cmd` and `post-update-cmd` sections of your `composer.json`:

```
    ...
    "scripts": {
        "post-install-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Braincrafted\\Bundle\\Symfony2CSBundle\\Composer\\ScriptHandler::installSymfony2CS"
        ],
        "post-update-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Braincrafted\\Bundle\\Symfony2CSBundle\\Composer\\ScriptHandler::installSymfony2CS"
        ]
    },
    ...
```

Usage
-----

[](#usage)

If you add the script handler to the `post-install-cmd` and `post-update-cmd` sections of your `composer.json` the bundle will install or update the coding standard everytime you run `composer install` or `composer update`.

You can use the Symfony2 coding standard when you run PHP\_CodeSniffer:

```
$ ./bin/phpcs --standard=Symfony2 ./src/
```

Error handling
--------------

[](#error-handling)

If you should encounter problem add the `--verbose` option to the command to view the output of the executed commands.

```
$ php app/console braincrafted:symfony2cs:install --verbose
```

Changelog
---------

[](#changelog)

### Version 0.2.1 (27 August 2014)

[](#version-021-27-august-2014)

- Updated path to coding standard repo (the original is gone)

### Version 0.2 (14 November 2013)

[](#version-02-14-november-2013)

- Changed namespace from `Bc` to `Braincrafted`
- Support for Symfony 2.4

License
-------

[](#license)

The bundle is licensed under The MIT License. See the `LICENSE` file for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~64 days

Recently: every ~80 days

Total

6

Last Release

4280d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a80f9fc61cd3a7d7779e8f120b458ca4d18fdd885d719bb77d3379b96bf714d9?d=identicon)[florianeckerstorfer](/maintainers/florianeckerstorfer)

---

Top Contributors

[![bitdeli-chef](https://avatars.githubusercontent.com/u/3092978?v=4)](https://github.com/bitdeli-chef "bitdeli-chef (1 commits)")[![mhor](https://avatars.githubusercontent.com/u/4103719?v=4)](https://github.com/mhor "mhor (1 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/braincrafted-symfony2cs-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/braincrafted-symfony2cs-bundle/health.svg)](https://phpackages.com/packages/braincrafted-symfony2cs-bundle)
```

###  Alternatives

[ezsystems/symfony-tools

eZ Systems Symfony Tools

19306.9k2](/packages/ezsystems-symfony-tools)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
