Skip to content

Commit 71b19c5

Browse files
authored
Merge pull request #128 from maxmind/greg/update-php-cs-fixer
Upgrade to php-cs-fixer 3.0
2 parents 569bd44 + af85e4d commit 71b19c5

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=.phpcs-ruleset.xml 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
@@ -24,7 +24,7 @@
2424
"ext-maxminddb": "<1.10.1,>=2.0.0"
2525
},
2626
"require-dev": {
27-
"friendsofphp/php-cs-fixer": "*",
27+
"friendsofphp/php-cs-fixer": "3.*",
2828
"phpunit/phpunit": ">=8.0.0,<10.0.0",
2929
"php-coveralls/php-coveralls": "^2.1",
3030
"phpunit/phpcov": ">=6.0.0",

0 commit comments

Comments
 (0)