PHPackages                             rroek/symfony3-custom-coding-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. rroek/symfony3-custom-coding-standard

ActiveCoding-standard[Testing &amp; Quality](/categories/testing)

rroek/symfony3-custom-coding-standard
=====================================

Customized CodeSniffer ruleset for the Symfony3 projects

316PHP

Since Mar 12Pushed 8y ago2 watchersCompare

[ Source](https://github.com/RRoek/RRoek-Symfony3CustomCodingStandard)[ Packagist](https://packagist.org/packages/rroek/symfony3-custom-coding-standard)[ RSS](/packages/rroek-symfony3-custom-coding-standard/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Symfony3 Custom PHP CodeSniffer Coding Standard
===============================================

[](#symfony3-custom-php-codesniffer-coding-standard)

This is a fork of
These are the Symfony2 standards, but tweaked to meet some needs we have in our projects to my job.
For example to comply with [PSR-12](https://github.com/php-fig/fig-standards/blob/master/proposed/extended-coding-style-guide.md) for PHP 7

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

[](#installation)

### Composer

[](#composer)

This standard can be installed with the [Composer](https://getcomposer.org/) dependency manager.

1. Add the repository to your composer.json:

```
composer require rroek/symfony3-custom-coding-standard

```

2. Add the coding standard as a dependency of your project

```
 "require-dev": {
        "RRoek/symfony3-custom-coding-standard": "^3.0"
    },
```

3. Add the coding standard to the PHP\_CodeSniffer install path

The path is relative to the php\_codesniffer install path.
This is important to make it work both in your vagrant, windows, local machine and/or PHPStorm. i.e. for your project with dependencies ruled by composer :

```
    ./vendor/bin/phpcs --config-set installed_paths ../../RRoek/symfony3-custom-coding-standard

```

4. Check the installed coding standards for "Symfony3RRoek"

    ```
     bin/phpcs -i

    ```
5. Done!

    ```
    bin/phpcs --standard=Symfony3RRoek /path/to/code (i.e. src)

    ```
6. (optional) Set up PHPStorm

- Configure code sniffer under Languages &amp; Frameworks -&gt; PHP -&gt; Code Sniffer
- Go to Editor -&gt; Inspections -&gt; PHP Code sniffer, refresh the standards and select Symfony3RRoek

Customizations
--------------

[](#customizations)

The following adjustments have been made to the original standard:

In Sniff/WhiteSpace/AssignmentSpacingSniff:

- Added an exception for `declare(strict_types=1);` to comply with [PSR-12](https://github.com/php-fig/fig-standards/blob/master/proposed/extended-coding-style-guide.md#3-declare-statements-namespace-and-use-declarations)

In Sniff/WhiteSpace/FunctionalClosingBraceSniff:

- copied from Squiz and adapted to have no blank line at the end of a function

In Sniff/Commenting/FunctionCommentSniff:

- check for 1 blank line above a docblock
- don't check docblocks for test and setUp methods (PHPunit, would be blank)
- do check protected and private methods for docblocks

In Sniff/NamingConventions/ValidClassNameSniff

- remove the abstract class name rule

In ruleset.xml

- Disabled the class comment rule
- Changed the concatenation spacing rule, for readability, to require 1 space around concatenation dot, instead of no spaces as the [Symfony](https://symfony.com/doc/current/contributing/code/standards.html#structure) standard requires.
- Re-enabled the blank line check from superfluousWhitespace (disabled in PSR-2)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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/1d3ba36778b511cc389f271d47b9bfe55b81c654e571153767f65d458e52b05f?d=identicon)[rroek](/maintainers/rroek)

---

Top Contributors

[![RRoek](https://avatars.githubusercontent.com/u/35526527?v=4)](https://github.com/RRoek "RRoek (1 commits)")

### Embed Badge

![Health badge](/badges/rroek-symfony3-custom-coding-standard/health.svg)

```
[![Health](https://phpackages.com/badges/rroek-symfony3-custom-coding-standard/health.svg)](https://phpackages.com/packages/rroek-symfony3-custom-coding-standard)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M679](/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.9M571](/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)
