Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/djoos/symfony-coding-standard
Development repository for the Symfony coding standard
https://github.com/djoos/symfony-coding-standard
coding-standard php php-codesniffer symfony
Last synced: about 6 hours ago
JSON representation
Development repository for the Symfony coding standard
- Host: GitHub
- URL: https://github.com/djoos/symfony-coding-standard
- Owner: djoos
- License: mit
- Created: 2014-08-28T09:13:19.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-09-30T10:59:23.000Z (4 months ago)
- Last Synced: 2024-10-29T22:51:51.827Z (3 months ago)
- Topics: coding-standard, php, php-codesniffer, symfony
- Language: PHP
- Homepage:
- Size: 241 KB
- Stars: 401
- Watchers: 19
- Forks: 102
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://secure.travis-ci.org/djoos/Symfony-coding-standard.png)](http://travis-ci.org/djoos/Symfony-coding-standard)
# Symfony PHP CodeSniffer Coding Standard
A coding standard to check against the [Symfony coding standards](http://symfony.com/doc/current/contributing/code/standards.html), originally shamelessly copied from the -disappeared- opensky/Symfony2-coding-standard repository.
## Installation
### Composer
This standard can be installed with the [Composer](https://getcomposer.org/) dependency manager.
1. [Install Composer](https://getcomposer.org/doc/00-intro.md)
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](https://github.com/squizlabs/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