PHPackages                             notrix/php\_codesniffer\_symfony - 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. notrix/php\_codesniffer\_symfony

AbandonedLibrary[Testing &amp; Quality](/categories/testing)

notrix/php\_codesniffer\_symfony
================================

PHP\_CodeSniffer ruleset for Symfony2 PSR coding standards.

01.2kPHP

Since Jan 13Pushed 11y ago2 watchersCompare

[ Source](https://github.com/notrix/symfony-coding-standard)[ Packagist](https://packagist.org/packages/notrix/php_codesniffer_symfony)[ RSS](/packages/notrix-php-codesniffer-symfony/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Symfony PSR-2 CodeSniffer ruleset [![Build Status](https://camo.githubusercontent.com/603053b9f5811e0b2c678c9a3421c2a001c03244e473972eae8aea548e5cb6d6/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f78616c6f70702f73796d666f6e792d636f64696e672d7374616e646172642e706e673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/603053b9f5811e0b2c678c9a3421c2a001c03244e473972eae8aea548e5cb6d6/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f78616c6f70702f73796d666f6e792d636f64696e672d7374616e646172642e706e673f6272616e63683d6d6173746572)
===================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#symfony-psr-2-codesniffer-ruleset-)

Provides a Symfony PSR CodeSniffer ruleset

- PSR-1 &amp; PSR-2
- Symfony standard
- Symfony naming conventions

Strongly inspired by the [OpenSky Symfony2 coding standard](https://github.com/opensky/Symfony2-coding-standard) (forked InterfaceSuffixSniff). Yet, this ruleset relies on CodeSniffer PSR-1 &amp; 2 sniffs and adds Symfony standards &amp; naming conventions. It also allows chained calls (fluent interface).

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

[](#installation)

1. Install phpcs:

    ```
     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 Symfony inside the phpcs `Standards` directory:

    ```
     cd /path/to/pear/PHP/CodeSniffer/Standards
     git clone git://github.com/xalopp/symfony-coding-standard.git Symfony

    ```
4. Select the Symfony ruleset as your default coding standard:

    ```
     phpcs --config-set default_standard Symfony

    ```
5. Profit

    ```
     phpcs path/to/my/file.php

    ```

Pragmatic &amp; opinionated customisations
------------------------------------------

[](#pragmatic--opinionated-customisations)

### Allows fluent-interface chained calls syntax

[](#allows-fluent-interface-chained-calls-syntax)

```

```

Known limitations
-----------------

[](#known-limitations)

- functions aren't enforced at the moment

Contributing
------------

[](#contributing)

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

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

```
    phpcs --ignore=Tests --standard=PEAR . -n

```

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

- get the [CodeSniffer repository](https://github.com/squizlabs/PHP_CodeSniffer)
- symlink, copy or clone this repository at CodeSniffer/Standard/Symfony
- from the CodeSniffer repository root run `phpunit --filter Symfony_ tests/AllTests.php`

Credit
------

[](#credit)

[OpenSky](https://github.com/opensky) for the [Symfony2 coding standard](https://github.com/opensky/Symfony2-coding-standard)

Issue
-----

[](#issue)

If you spot any missing standard/conventions and don't want to contribute, please open an issue. It will at least be added to this readme.

Licence
-------

[](#licence)

Copyright (c) 2013 Ludovic Fleury

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.4% 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.

### Community

Maintainers

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

---

Top Contributors

[![xalopp](https://avatars.githubusercontent.com/u/1674529?v=4)](https://github.com/xalopp "xalopp (38 commits)")[![ludofleury](https://avatars.githubusercontent.com/u/187038?v=4)](https://github.com/ludofleury "ludofleury (6 commits)")[![mschroeder](https://avatars.githubusercontent.com/u/188470?v=4)](https://github.com/mschroeder "mschroeder (1 commits)")

### Embed Badge

![Health badge](/badges/notrix-php-codesniffer-symfony/health.svg)

```
[![Health](https://phpackages.com/badges/notrix-php-codesniffer-symfony/health.svg)](https://phpackages.com/packages/notrix-php-codesniffer-symfony)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M678](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M753](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.0k](/packages/orchestra-testbench)

PHPackages © 2026

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