Skip to content

Commit f207872

Browse files
committed
Upgraded friendsofphp/php-cs-fixer from 2.19 to 3.0 and made necessary changes to configuration files so it keeps working
1 parent 0f777cb commit f207872

File tree

4 files changed

+42
-134
lines changed

4 files changed

+42
-134
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
.php_cs.cache
1+
.php-cs-fixer.cache
22
auth.json
33
/vendor/

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
->exclude('vendor')
66
;
77

8-
return PhpCsFixer\Config::create()
8+
$config = new PhpCsFixer\Config();
9+
return $config
910
->setRules([
1011
'@Symfony' => true,
1112
'@PSR12' => true,
12-
'array_syntax' => ['syntax' => 'short'],
1313
'binary_operator_spaces' => ['default' => null, 'operators' => ['=>' => 'align']],
1414
'concat_space' => ['spacing' => 'one'],
1515
'declare_strict_types' => true,
@@ -27,8 +27,8 @@
2727
'phpdoc_summary' => false,
2828
'self_accessor' => true,
2929
'single_line_throw' => false,
30-
'visibility_required' => ['property', 'method'], // removed 'const' since we still support PHP 7.0 for now
31-
'yoda_style' => null,
30+
'visibility_required' => ['elements' => ['property', 'method']], // removed 'const' since we still support PHP 7.0 for now
31+
'yoda_style' => false,
3232
])
3333
->setFinder($finder)
3434
;

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"require-dev": {
2424
"bitexpert/phpstan-magento": "^0.7.0",
2525
"ergebnis/composer-normalize": "^2.2",
26-
"friendsofphp/php-cs-fixer": "^2.18",
26+
"friendsofphp/php-cs-fixer": "^3.0",
2727
"magento/magento-coding-standard": "^6.0",
2828
"phpcompatibility/php-compatibility": "^9.2",
2929
"phpstan/extension-installer": "^1.0",

composer.lock

Lines changed: 36 additions & 128 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)