Skip to content

Commit

Permalink
Upgrade to php-cs-fixer 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwald committed May 4, 2021
1 parent 569bd44 commit af85e4d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
run: composer install --no-progress --prefer-dist --optimize-autoloader

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

- name: Lint with phpcs
run: vendor/bin/phpcs --standard=.phpcs-ruleset.xml src/
Expand Down
7 changes: 3 additions & 4 deletions .php_cs → .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

return PhpCsFixer\Config::create()
$config = new PhpCsFixer\Config();

return $config
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
Expand All @@ -19,13 +21,10 @@
'increment_style' => false,
'list_syntax' => ['syntax' => 'short'],
'multiline_whitespace_before_semicolons' => false,
'no_extra_consecutive_blank_lines' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'],
'no_short_echo_tag' => true,
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_imports' => true,
'pre_increment' => false,
'php_unit_strict' => true,
'php_unit_test_class_requires_covers' => true,
'phpdoc_add_missing_param_annotation' => true,
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"ext-maxminddb": "<1.10.1,>=2.0.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "*",
"friendsofphp/php-cs-fixer": "3.*",
"phpunit/phpunit": ">=8.0.0,<10.0.0",
"php-coveralls/php-coveralls": "^2.1",
"phpunit/phpcov": ">=6.0.0",
Expand Down

0 comments on commit af85e4d

Please sign in to comment.