Skip to content

Commit 2d91fa2

Browse files
Jakob Linskesederjaylinski
authored andcommitted
Update PHP-CS-Fixer to v3
1 parent e7c2ec2 commit 2d91fa2

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
vendor/
22
composer.lock
33
.phpunit.result.cache
4-
.php_cs.cache
4+
.php-cs-fixer.cache
55
coverage.xml

.php_cs renamed to .php-cs-fixer.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
$finder = PhpCsFixer\Finder::create()
44
->in(__DIR__ . DIRECTORY_SEPARATOR . 'tests')
55
->in(__DIR__ . DIRECTORY_SEPARATOR . 'src')
6-
->append(['.php_cs']);
6+
->append(['.php-cs-fixer.php']);
77

88
$rules = [
99
'@Symfony' => true,
1010
'phpdoc_no_empty_return' => false,
11-
'array_syntax' => ['syntax' => 'short'],
1211
'yoda_style' => false,
1312
'binary_operator_spaces' => [
1413
'operators' => [
@@ -18,11 +17,10 @@
1817
],
1918
'concat_space' => ['spacing' => 'one'],
2019
'not_operator_with_space' => false,
20+
'increment_style' => ['style' => 'post'],
2121
];
2222

23-
$rules['increment_style'] = ['style' => 'post'];
24-
25-
return PhpCsFixer\Config::create()
23+
return (new PhpCsFixer\Config())
2624
->setUsingCache(true)
2725
->setRules($rules)
2826
->setFinder($finder);

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"require-dev": {
2828
"phpunit/phpunit": "^8.0 || ^9.0",
29-
"friendsofphp/php-cs-fixer": "^2.16",
29+
"friendsofphp/php-cs-fixer": "^3.4",
3030
"phpstan/phpstan": "^1.2"
3131
},
3232
"scripts": {

0 commit comments

Comments
 (0)