Skip to content

Commit 41fcf34

Browse files
committed
Update php-cs-fixer to v3
1 parent be18c1c commit 41fcf34

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.phpunit.result.cache
22

33
/.idea
4-
/.php_cs
5-
/.php_cs.cache
6-
/.php_cs.tests.cache
4+
/.php-cs-fixer.cache
5+
/.php-cs-fixer.php
6+
/.php-cs-fixer.tests.cache
77
/composer.lock
88
/vendor

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
],
3131
'return_type_declaration' => true,
3232
'short_scalar_cast' => true,
33-
'single_blank_line_before_namespace' => true,
3433
'single_trait_insert_per_statement' => true,
3534
'ternary_operator_spaces' => true,
3635
'visibility_required' => [
@@ -56,7 +55,7 @@
5655
'no_unused_imports' => true,
5756
'single_quote' => true,
5857
'space_after_semicolon' => true,
59-
'trailing_comma_in_multiline_array' => true,
58+
'trailing_comma_in_multiline' => true,
6059
'trim_array_spaces' => true,
6160
'unary_operator_spaces' => true,
6261
'whitespace_after_comma_in_array' => true,

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
->in(__DIR__)
66
->exclude('tests');
77

8-
$config = require __DIR__ . '/.php_cs.common.php';
8+
$config = require __DIR__ . '/.php-cs-fixer.common.php';
99

10-
return PhpCsFixer\Config::create()
10+
return (new PhpCsFixer\Config())
1111
->setFinder($finder)
1212
->setRules($config)
1313
->setRiskyAllowed(true)
14-
->setCacheFile(__DIR__ . '/.php_cs.cache');
14+
->setCacheFile(__DIR__ . '/.php-cs-fixer.cache');

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
->in(__DIR__ . '/tests')
66
->exclude('__snapshots__');
77

8-
$config = require __DIR__ . '/.php_cs.common.php';
8+
$config = require __DIR__ . '/.php-cs-fixer.common.php';
99

1010
// Additional rules for tests
1111
$config = array_merge(
@@ -15,8 +15,8 @@
1515
]
1616
);
1717

18-
return PhpCsFixer\Config::create()
18+
return (new PhpCsFixer\Config())
1919
->setFinder($finder)
2020
->setRules($config)
2121
->setRiskyAllowed(true)
22-
->setCacheFile(__DIR__ . '/.php_cs.tests.cache');
22+
->setCacheFile(__DIR__ . '/.php-cs-fixer.tests.cache');

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
},
3434
"require-dev": {
3535
"ext-pdo_sqlite": "*",
36-
"friendsofphp/php-cs-fixer": "^2",
36+
"friendsofphp/php-cs-fixer": "^3",
3737
"illuminate/config": "^9 || ^10",
3838
"illuminate/view": "^9 || ^10",
3939
"mockery/mockery": "^1.4",
@@ -81,7 +81,7 @@
8181
],
8282
"fix-style": [
8383
"php-cs-fixer fix",
84-
"php-cs-fixer fix --config=.php_cs.tests.php"
84+
"php-cs-fixer fix --config=.php-cs-fixer.tests.php"
8585
],
8686
"psalm-set-baseline": "psalm --set-baseline=psalm-baseline.xml",
8787
"test": "phpunit",

0 commit comments

Comments
 (0)