Skip to content

Commit a7ebbff

Browse files
committed
Updated to php-cs-fixer 2.0
1 parent a69c38b commit a7ebbff

File tree

3 files changed

+181
-118
lines changed

3 files changed

+181
-118
lines changed

.php_cs

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
11
#!/usr/bin/env php
22
<?php
3-
4-
$finder = Symfony\CS\Finder::create()
5-
->ignoreDotFiles(true)
6-
->ignoreVCS(true)
7-
->exclude('app/config')
8-
->exclude('app/data')
9-
->exclude('app/Resources')
10-
->exclude('var')
11-
->exclude('vendor')
12-
->exclude('web/bundles')
13-
->exclude('web/css')
14-
->exclude('web/fonts')
15-
->exclude('web/js')
16-
->notPath('web/config.php')
17-
->in(__DIR__)
18-
;
19-
20-
return Symfony\CS\Config::create()
21-
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
22-
->fixers([
23-
'-psr0', // Ignore Tests\ namespace prefix mismatch with tests/ directory
24-
'ordered_use',
25-
'phpdoc_order',
26-
'short_array_syntax',
3+
return PhpCsFixer\Config::create()
4+
->setRiskyAllowed(true)
5+
->setRules([
6+
'@Symfony' => true,
7+
'@Symfony:risky' => true,
8+
'array_syntax' => ['syntax' => 'short'],
9+
'ordered_imports' => true,
10+
'phpdoc_order' => true,
2711
])
28-
->finder($finder)
12+
->setFinder(
13+
PhpCsFixer\Finder::create()
14+
->ignoreDotFiles(true)
15+
->ignoreVCS(true)
16+
->exclude('app/config')
17+
->exclude('app/data')
18+
->exclude('app/Resources')
19+
->exclude('var')
20+
->exclude('vendor')
21+
->exclude('web/bundles')
22+
->exclude('web/css')
23+
->exclude('web/fonts')
24+
->exclude('web/js')
25+
->notPath('web/config.php')
26+
->in(__DIR__)
27+
)
2928
;

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"white-october/pagerfanta-bundle" : "^1.0"
3030
},
3131
"require-dev": {
32-
"friendsofphp/php-cs-fixer" : "^1.12",
32+
"friendsofphp/php-cs-fixer" : "^2.0",
3333
"phpunit/phpunit" : "^4.8 || ^5.0",
3434
"sensio/generator-bundle" : "^3.0",
3535
"symfony/phpunit-bridge" : "^3.0"

0 commit comments

Comments
 (0)