Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 895 Bytes

installation.md

File metadata and controls

35 lines (23 loc) · 895 Bytes

Installation

This standard can be installed with the Composer dependency manager.

  1. Add the coding standard as a dependency of your project
composer require --dev vincentlanglet/symfony-custom-coding-standard
  1. 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, local machine and PHPStorm

bin/phpcs --config-set installed_paths ../../vincentlanglet/symfony-custom-coding-standard
  1. Check the installed coding standards
bin/phpcs -i
  1. Done!
bin/phpcs --standard=SymfonyCustom /path/to/code
  1. (optional) Set up PHPStorm
  • configure code sniffer under Languages & Frameworks -> PHP -> Code Sniffer
  • Go to Editor -> Inspections -> PHP Code sniffer, refresh the standards and select SymfonyCustom