This standard can be installed with the Composer dependency manager.
- Add the coding standard as a dependency of your project
composer require --dev vincentlanglet/symfony-custom-coding-standard
- 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
- Check the installed coding standards
bin/phpcs -i
- Done!
bin/phpcs --standard=SymfonyCustom /path/to/code
- (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