File tree 4 files changed +37
-5
lines changed
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:
26
26
- composer update --prefer-source
27
27
28
28
script :
29
+ - vendor/bin/php-cs-fixer fix -v --diff --dry-run
29
30
- vendor/bin/behat --tags=~symfony27
30
31
- >
31
32
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 28
28
"symfony/console" : " ~2.5"
29
29
},
30
30
"require-dev" : {
31
- "behat/behat" : " ~3.0" ,
32
31
"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" ,
33
37
"symfony/framework-bundle" : " ~2.5" ,
34
38
"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"
39
40
}
40
41
}
You can’t perform that action at this time.
0 commit comments