Skip to content

Commit 8bb18d4

Browse files
authored
Merge pull request #164 from maxmind/greg/update-php-cs-fixer
Upgrade to php-cs-fixer 3.0
2 parents 034016f + 955e5ab commit 8bb18d4

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
run: composer install --no-progress --prefer-dist --optimize-autoloader
2020

2121
- name: Lint with php-cs-fixer
22-
run: vendor/bin/php-cs-fixer fix --verbose --diff --dry-run --config=.php_cs
22+
run: vendor/bin/php-cs-fixer fix --verbose --diff --dry-run
2323

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

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22

3-
return PhpCsFixer\Config::create()
3+
$config = new PhpCsFixer\Config();
4+
5+
return $config
46
->setRiskyAllowed(true)
57
->setRules([
68
'@Symfony' => true,
@@ -19,13 +21,10 @@
1921
'increment_style' => false,
2022
'list_syntax' => ['syntax' => 'short'],
2123
'multiline_whitespace_before_semicolons' => false,
22-
'no_extra_consecutive_blank_lines' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'],
23-
'no_short_echo_tag' => true,
2424
'no_unreachable_default_argument_value' => true,
2525
'no_useless_else' => true,
2626
'no_useless_return' => true,
2727
'ordered_imports' => true,
28-
'pre_increment' => false,
2928
'php_unit_strict' => true,
3029
'php_unit_test_class_requires_covers' => true,
3130
'phpdoc_add_missing_param_annotation' => true,

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"ext-json": "*"
2020
},
2121
"require-dev": {
22-
"friendsofphp/php-cs-fixer": "*",
22+
"friendsofphp/php-cs-fixer": "3.*",
2323
"phpunit/phpunit": "^8.0 || ^9.0",
2424
"squizlabs/php_codesniffer": "3.*",
2525
"phpstan/phpstan": "*"

0 commit comments

Comments
 (0)