File tree Expand file tree Collapse file tree 4 files changed +37
-5
lines changed Expand file tree Collapse file tree 4 files changed +37
-5
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ $ finder = Symfony \CS \Finder \DefaultFinder::create ()
3+ ->in ('src ' )
4+ ->in ('test ' )
5+ ->notPath ('temp ' );
6+ $ config = Symfony \CS \Config \Config::create ();
7+ $ config ->fixers (['ordered_use ' ]);
8+ $ config ->finder ($ finder );
9+ return $ config ;
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ install:
2626 - composer update --prefer-source
2727
2828script :
29+ - vendor/bin/php-cs-fixer fix -v --diff --dry-run
2930 - vendor/bin/behat --tags=~symfony27
3031 - >
3132 if [ "SYMFONY_VERSION" == "2.7.*" ]; then
Original file line number Diff line number Diff line change 1+ ## Running Coding Standards Checks
2+
3+ This component uses [ php-cs-fixer] ( http://cs.sensiolabs.org/ ) for coding
4+ standards checks, and provides configuration for our selected checks.
5+ ` php-cs-fixer ` is installed by default via Composer.
6+
7+ To run checks only:
8+
9+ ``` console
10+ $ ./vendor/bin/php-cs-fixer fix . -v --diff --dry-run --config-file=.php_cs
11+ ```
12+
13+ To have ` php-cs-fixer ` attempt to fix problems for you, omit the ` --dry-run `
14+ flag:
15+
16+ ``` console
17+ $ ./vendor/bin/php-cs-fixer fix . -v --diff --config-file=.php_cs
18+ ```
19+
20+ If you allow php-cs-fixer to fix CS issues, please re-run the tests to ensure
21+ they pass, and make sure you add and commit the changes after verification.
Original file line number Diff line number Diff line change 2828 "symfony/console" : " ~2.5"
2929 },
3030 "require-dev" : {
31- "behat/behat" : " ~3.0" ,
3231 "beberlei/assert" : " ~2.1" ,
32+ "behat/behat" : " ~3.0" ,
33+ "fabpot/php-cs-fixer" : " ^1.10" ,
34+ "symfony/console" : " ~2.5" ,
35+ "symfony/finder" : " ~2.5" ,
36+ "symfony/form" : " ~2.5" ,
3337 "symfony/framework-bundle" : " ~2.5" ,
3438 "symfony/validator" : " ~2.5" ,
35- "symfony/form" : " ~2.5" ,
36- "symfony/yaml" : " ~2.5" ,
37- "symfony/finder" : " ~2.5" ,
38- "symfony/console" : " ~2.5"
39+ "symfony/yaml" : " ~2.5"
3940 }
4041}
You can’t perform that action at this time.
0 commit comments