From 1f10b4640262eee5f1ccceefa23eb4f3466a3466 Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Wed, 12 May 2021 11:26:09 +0100 Subject: [PATCH] chore: migrate to PHP-CS-Fixer 3.x --- .gitattributes | 30 ++++++++++++++---------------- .gitignore | 5 +++-- .php_cs => .php-cs-fixer.dist.php | 4 ++-- 3 files changed, 19 insertions(+), 20 deletions(-) rename .php_cs => .php-cs-fixer.dist.php (91%) diff --git a/.gitattributes b/.gitattributes index f19490bb..234cbbf8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,16 +1,14 @@ -/art export-ignore -/docs export-ignore -/tests export-ignore -/scripts export-ignore -/.github export-ignore -/.php_cs export-ignore -.editorconfig export-ignore -.gitattributes export-ignore -.gitignore export-ignore -.travis.yml export-ignore -phpstan.neon export-ignore -rector.yaml export-ignore -phpunit.xml export-ignore -CHANGELOG.md export-ignore -CONTRIBUTING.md export-ignore -README.md export-ignore +/art export-ignore +/docs export-ignore +/tests export-ignore +/scripts export-ignore +/.github export-ignore +/.php-cs-fixer.dist.php export-ignore +.editorconfig export-ignore +.gitattributes export-ignore +.gitignore export-ignore +phpstan.neon export-ignore +phpunit.xml export-ignore +CHANGELOG.md export-ignore +CONTRIBUTING.md export-ignore +README.md export-ignore diff --git a/.gitignore b/.gitignore index 55be8019..7b80f949 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,9 @@ composer.lock /vendor/ coverage.xml .phpunit.result.cache -.php_cs.cache +/.php-cs-fixer.php +.php-cs-fixer.cache .temp/coverage.php *.swp *.swo -.vscode/ \ No newline at end of file +.vscode/ diff --git a/.php_cs b/.php-cs-fixer.dist.php similarity index 91% rename from .php_cs rename to .php-cs-fixer.dist.php index d163e603..e2be14a2 100644 --- a/.php_cs +++ b/.php-cs-fixer.dist.php @@ -6,7 +6,7 @@ $finder = PhpCsFixer\Finder::create() ->in(__DIR__ . DIRECTORY_SEPARATOR . 'scripts') ->in(__DIR__ . DIRECTORY_SEPARATOR . 'stubs') ->in(__DIR__ . DIRECTORY_SEPARATOR . 'src') - ->append(['.php_cs']); + ->append(['.php-cs-fixer.dist.php']); $rules = [ '@Symfony' => true, @@ -25,7 +25,7 @@ $rules = [ $rules['increment_style'] = ['style' => 'post']; -return PhpCsFixer\Config::create() +return (new PhpCsFixer\Config()) ->setUsingCache(true) ->setRules($rules) ->setFinder($finder);