PHPackages                             leaphub/phpcs-symfony2-standard - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. leaphub/phpcs-symfony2-standard

Abandoned → [slevomat/coding-standard](/?search=slevomat%2Fcoding-standard)Library[Testing &amp; Quality](/categories/testing)

leaphub/phpcs-symfony2-standard
===============================

A PHP\_CodeSniffer standard for Symfony 2 applications

v2.0.3(11y ago)47721.5k↓67.7%1720MITPHP

Since Nov 11Pushed 5y ago5 watchersCompare

[ Source](https://github.com/leaphub/phpcs-symfony2-standard)[ Packagist](https://packagist.org/packages/leaphub/phpcs-symfony2-standard)[ Docs](https://github.com/leaphub/phpcs-symfony2-standard)[ RSS](/packages/leaphub-phpcs-symfony2-standard/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (6)Used By (20)

Symfony2 PHP\_CodeSniffer Coding Standard
=========================================

[](#symfony2-php_codesniffer-coding-standard)

A composer installable coding standard to check against the [Symfony coding standards](http://symfony.com/doc/current/contributing/code/standards.html).

This project was based on the [standard provided by @lapistano](https://github.com/lapistano/Symfony2-coding-standard)

Installation
------------

[](#installation)

This coding standard can be installed via composer or be used in you PHP\_CodeSniffer install over PECL. Both ways are described in the following but the composer way is recommedend:

### Using Composer

[](#using-composer)

1. Install The standard as dependency of your composer based project (It will install the composer version of PHP\_CodeSniffer as dependency):

    ```
     $ php composer.phar require --dev leaphub/phpcs-symfony2-standard:~2.0.0

    ```
2. Profit!

    ```
     $ bin/phpcs --standard=vendor/leaphub/phpcs-symfony2-standard/leaphub/phpcs/Symfony2/ --extensions=php src/

    ```

### Using PEAR

[](#using-pear)

1. Install PHP\_CodeSniffer:

    ```
     $ pear install PHP_CodeSniffer

    ```
2. Find your PEAR directory:

    ```
     $ pear config-show | grep php_dir

    ```
3. Copy, symlink or check out this repo to a folder called Symfony2 inside the phpcs `Standards` directory:

    ```
     $ cd /path/to/pear/PHP/CodeSniffer/Standards
     $ git clone git@github.com:leaphub/phpcs-symfony2-standard.git Symfony2

    ```
4. Set Symfony2 as your default coding standard if cou want:

    ```
     $ phpcs --config-set default_standard Symfony2

    ```
5. Profit!

    ```
     $ phpcs --standard=Symfony2 --extensions=php src/

    ```

Contributing
============

[](#contributing)

If you do contribute code to these sniffs, please make sure it conforms to the PEAR coding standard and that the Symfony2-coding-standard unit tests still pass.

To check the coding standard, run from the Symfony2-coding-standard source root:

```
$ phpcs --ignore=*/tests/* --standard=PEAR . -n

```

The unit-tests are run from within the PHP\_CodeSniffer directory:

```
$ phpunit --filter Symfony2_* tests/AllTests.php

```

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity47

Moderate usage in the ecosystem

Community36

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~33 days

Total

5

Last Release

4119d ago

Major Versions

v1.0 → v2.0.02014-12-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/108d1372106a40a104429a31c9ebdc6d87d006d8b8f8fe3bbccc319656eaa1bd?d=identicon)[cfoehrdes](/maintainers/cfoehrdes)

---

Top Contributors

[![bobthecow](https://avatars.githubusercontent.com/u/53660?v=4)](https://github.com/bobthecow "bobthecow (25 commits)")[![davehauenstein](https://avatars.githubusercontent.com/u/11996?v=4)](https://github.com/davehauenstein "davehauenstein (5 commits)")[![francisbesset](https://avatars.githubusercontent.com/u/471525?v=4)](https://github.com/francisbesset "francisbesset (4 commits)")[![derhasi](https://avatars.githubusercontent.com/u/118502?v=4)](https://github.com/derhasi "derhasi (3 commits)")[![pborreli](https://avatars.githubusercontent.com/u/77759?v=4)](https://github.com/pborreli "pborreli (2 commits)")[![pvankouteren](https://avatars.githubusercontent.com/u/1055598?v=4)](https://github.com/pvankouteren "pvankouteren (2 commits)")[![ktomk](https://avatars.githubusercontent.com/u/352517?v=4)](https://github.com/ktomk "ktomk (2 commits)")[![robocoder](https://avatars.githubusercontent.com/u/922051?v=4)](https://github.com/robocoder "robocoder (1 commits)")[![soullivaneuh](https://avatars.githubusercontent.com/u/1698357?v=4)](https://github.com/soullivaneuh "soullivaneuh (1 commits)")[![AD7six](https://avatars.githubusercontent.com/u/33387?v=4)](https://github.com/AD7six "AD7six (1 commits)")[![xgorse](https://avatars.githubusercontent.com/u/117971?v=4)](https://github.com/xgorse "xgorse (1 commits)")[![asm89](https://avatars.githubusercontent.com/u/657357?v=4)](https://github.com/asm89 "asm89 (1 commits)")[![cfoehrdes](https://avatars.githubusercontent.com/u/1835349?v=4)](https://github.com/cfoehrdes "cfoehrdes (1 commits)")[![fabpot](https://avatars.githubusercontent.com/u/47313?v=4)](https://github.com/fabpot "fabpot (1 commits)")[![fbrandt](https://avatars.githubusercontent.com/u/1192066?v=4)](https://github.com/fbrandt "fbrandt (1 commits)")[![merk](https://avatars.githubusercontent.com/u/278097?v=4)](https://github.com/merk "merk (1 commits)")[![qpleple](https://avatars.githubusercontent.com/u/774546?v=4)](https://github.com/qpleple "qpleple (1 commits)")

---

Tags

phpcssymfony 2Coding Standard

### Embed Badge

![Health badge](/badges/leaphub-phpcs-symfony2-standard/health.svg)

```
[![Health](https://phpackages.com/badges/leaphub-phpcs-symfony2-standard/health.svg)](https://phpackages.com/packages/leaphub-phpcs-symfony2-standard)
```

###  Alternatives

[slevomat/coding-standard

Slevomat Coding Standard for PHP\_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.

1.5k134.0M2.3k](/packages/slevomat-coding-standard)[escapestudios/symfony2-coding-standard

CodeSniffer ruleset for the Symfony 2+ coding standard

40611.5M301](/packages/escapestudios-symfony2-coding-standard)[consistence/coding-standard

Consistence - Coding Standard - PHP Code Sniffer rules

76842.7k94](/packages/consistence-coding-standard)[webimpress/coding-standard

Webimpress Coding Standard

152.3M41](/packages/webimpress-coding-standard)[mreduar/laravel-phpcs

PHP Codesniffer ruleset to follow Laravel's coding style

3917.6k1](/packages/mreduar-laravel-phpcs)[endouble/symfony3-custom-coding-standard

Customized CodeSniffer ruleset for the Symfony3 projects

13108.7k1](/packages/endouble-symfony3-custom-coding-standard)

PHPackages © 2026

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