escapestudios/symfony2-coding-standard

CodeSniffer ruleset for the Symfony 2+ coding standard

Maintainers

👁 devesc
👁 djoos

Package info

github.com/djoos/Symfony-coding-standard

Type:phpcodesniffer-standard

pkg:composer/escapestudios/symfony2-coding-standard

Statistics

Installs: 11 476 763

Dependents: 320

Suggesters: 2

Stars: 406

Open Issues: 16

3.18.0 2025-12-17 15:53 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

Replaces

None

MIT c18f77aacaa77b0c7087b8a725dbf1ca5e9b0561

symfonySymfony2static analysisphpcsCoding Standard


README

👁 Build Status

Symfony PHP CodeSniffer Coding Standard

A coding standard to check against the Symfony coding standards, originally shamelessly copied from the -disappeared- opensky/Symfony2-coding-standard repository.

Installation

Composer

This standard can be installed with the Composer dependency manager.

  1. Install Composer

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

     composer require --dev escapestudios/symfony2-coding-standard:3.x-dev
    
  3. Add the coding standard to the PHP_CodeSniffer install path

     vendor/bin/phpcs --config-set installed_paths vendor/escapestudios/symfony2-coding-standard
    
  4. Check the installed coding standards for "Symfony"

     vendor/bin/phpcs -i
    
  5. Done!

     vendor/bin/phpcs /path/to/code
    

Stand-alone

  1. Install PHP_CodeSniffer

  2. Checkout this repository

     git clone git://github.com/djoos/Symfony2-coding-standard.git
    
  3. Add the coding standard to the PHP_CodeSniffer install path

     phpcs --config-set installed_paths /path/to/Symfony2-coding-standard
    

    Or copy/symlink this repository's "Symfony"-folder inside the phpcs Standards directory

  4. Check the installed coding standards for "Symfony"

     phpcs -i
    
  5. Done!

     phpcs /path/to/code