Skip to content

Commit 00cfe04

Browse files
committed
Upgrade to php-cs-fixer 3.0
1 parent 0f36a27 commit 00cfe04

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
run: composer install --no-progress --prefer-dist --optimize-autoloader
2121

2222
- name: Lint with php-cs-fixer
23-
run: vendor/bin/php-cs-fixer fix --verbose --diff --dry-run --config=.php_cs
23+
run: vendor/bin/php-cs-fixer fix --verbose --diff --dry-run
2424

2525
- name: Lint with phpcs
2626
run: vendor/bin/phpcs --standard=PSR2 src/

.php_cs .php-cs-fixer.php

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22

3-
declare(strict_types=1);
3+
$config = new PhpCsFixer\Config();
44

5-
return PhpCsFixer\Config::create()
5+
return $config
66
->setRiskyAllowed(true)
77
->setRules([
88
'@Symfony' => true,
@@ -21,13 +21,10 @@
2121
'increment_style' => false,
2222
'list_syntax' => ['syntax' => 'short'],
2323
'multiline_whitespace_before_semicolons' => false,
24-
'no_extra_consecutive_blank_lines' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'],
25-
'no_short_echo_tag' => true,
2624
'no_unreachable_default_argument_value' => true,
2725
'no_useless_else' => true,
2826
'no_useless_return' => true,
2927
'ordered_imports' => true,
30-
'pre_increment' => false,
3128
// Although we generally want to use assertSame, there are times
3229
// when we do not, such as comparing two object for non-referential
3330
// equality.

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"respect/validation": "~2.1"
2525
},
2626
"require-dev": {
27-
"friendsofphp/php-cs-fixer": "*",
27+
"friendsofphp/php-cs-fixer": "3.*",
2828
"phpunit/phpunit": "^8.0 || ^9.0",
2929
"squizlabs/php_codesniffer": "*",
3030
"phpstan/phpstan": "*"

0 commit comments

Comments
 (0)