From 1462a3215e04a3bdec8f3463d6ceeca4e3049ca0 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Sat, 15 May 2021 21:29:53 +0200 Subject: [PATCH] Migrate configuration file for PHP CS Fixer 2.19/3.0 --- .gitignore | 3 ++- .php_cs.dist => .php-cs-fixer.dist.php | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) rename .php_cs.dist => .php-cs-fixer.dist.php (93%) diff --git a/.gitignore b/.gitignore index dc8ee794ab..0c37517192 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ vendor/ composer.lock phpunit.xml -.php_cs.cache +.php-cs-fixer.cache +.php-cs-fixer.php .phpunit.result.cache composer.phar package.tar diff --git a/.php_cs.dist b/.php-cs-fixer.dist.php similarity index 93% rename from .php_cs.dist rename to .php-cs-fixer.dist.php index cf005b001e..583be2ac59 100644 --- a/.php_cs.dist +++ b/.php-cs-fixer.dist.php @@ -4,7 +4,7 @@ if (!file_exists(__DIR__.'/src')) { exit(0); } -return PhpCsFixer\Config::create() +return (new PhpCsFixer\Config()) ->setRules([ '@PHP71Migration' => true, '@PHPUnit75Migration:risky' => true, @@ -14,7 +14,7 @@ return PhpCsFixer\Config::create() ]) ->setRiskyAllowed(true) ->setFinder( - PhpCsFixer\Finder::create() + (new PhpCsFixer\Finder()) ->in(__DIR__.'/src') ->append([__FILE__]) ->notPath('#/Fixtures/#') @@ -39,4 +39,5 @@ return PhpCsFixer\Config::create() ->notPath('Symfony/Component/Debug/Tests/DebugClassLoaderTest.php') ->notPath('Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php') ) + ->setCacheFile('.php-cs-fixer.cache') ;