From 22a5b827b2a13c18158b1dbf87746986d27c665d Mon Sep 17 00:00:00 2001 From: Frederik Bosch Date: Fri, 18 Feb 2022 17:11:35 +0100 Subject: [PATCH] upgrade php cs fixer --- .gitignore | 2 +- .php_cs.dist => .php-cs-fixer.dist.php | 4 ++-- composer.json | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) rename .php_cs.dist => .php-cs-fixer.dist.php (81%) diff --git a/.gitignore b/.gitignore index debdd2e9..22d0ca8e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,5 @@ /vendor/ /composer.lock /example/config.php -/.php_cs.cache +/.php-cs-fixer.cache /.phpunit.result.cache diff --git a/.php_cs.dist b/.php-cs-fixer.dist.php similarity index 81% rename from .php_cs.dist rename to .php-cs-fixer.dist.php index 00957830..cdbda766 100644 --- a/.php_cs.dist +++ b/.php-cs-fixer.dist.php @@ -1,11 +1,11 @@ setRules([ '@PSR2' => true, 'array_syntax' => ['syntax' => 'short'], 'declare_strict_types' => true, 'yoda_style' => false, - 'native_function_invocation' => true, + 'native_function_invocation' => ['include' => ['@all']], 'phpdoc_no_package' => true, 'no_empty_phpdoc' => true, 'no_blank_lines_after_class_opening' => true, diff --git a/composer.json b/composer.json index af16056a..c07cab60 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ "phpunit/phpunit": "^8.5.3", "phpstan/phpstan": "^0.12.48", "phpstan/phpstan-phpunit": "^0.12.6", - "friendsofphp/php-cs-fixer": "^2.9", + "friendsofphp/php-cs-fixer": "^3.0", "predis/predis": "^1.0", "psr/log": "^1.0", "ext-openssl": "*" @@ -38,11 +38,11 @@ }, "scripts": { "lint": [ - "./vendor/bin/php-cs-fixer fix --verbose --config .php_cs.dist ./src ./test" + "./vendor/bin/php-cs-fixer fix --verbose --config .php-cs-fixer.dist.php ./src ./test" ], "test": [ "./vendor/bin/phpunit -c phpunit.xml", - "./vendor/bin/php-cs-fixer fix --verbose --dry-run --config .php_cs.dist ./src ./test", + "./vendor/bin/php-cs-fixer fix --verbose --dry-run --config .php-cs-fixer.dist.php ./src ./test", "./vendor/bin/phpstan analyse -l max src", "./vendor/bin/phpstan analyse -l 5 -c .phpstan.test.neon test" ]