From 23968360607c5644336d7cb686b999ac2b853c9e Mon Sep 17 00:00:00 2001 From: Jesse Rushlow Date: Tue, 4 May 2021 07:14:26 -0400 Subject: [PATCH] [ci] upgrade php-cs-fixer 2.x -> 3.0 --- .gitignore | 2 +- .php_cs.dist => .php-cs-fixer.dist.php | 5 ++--- composer.json | 2 +- src/Resources/test/.php_cs.test | 3 +-- 4 files changed, 5 insertions(+), 7 deletions(-) rename .php_cs.dist => .php-cs-fixer.dist.php (86%) diff --git a/.gitignore b/.gitignore index a67bde416..dc6e9582f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,5 @@ /phpunit.xml /vendor/ /tests/tmp/* -/.php_cs.cache +/.php-cs-fixer.cache /.phpunit.result.cache diff --git a/.php_cs.dist b/.php-cs-fixer.dist.php similarity index 86% rename from .php_cs.dist rename to .php-cs-fixer.dist.php index 7fd542a34..ee09e0477 100644 --- a/.php_cs.dist +++ b/.php-cs-fixer.dist.php @@ -4,7 +4,7 @@ exit(0); } -$finder = PhpCsFixer\Finder::create() +$finder = (new PhpCsFixer\Finder()) ->in(__DIR__) ->exclude('vendor') ->exclude('tests/tmp') @@ -13,12 +13,11 @@ ->notName('*.tpl.php') ; -return PhpCsFixer\Config::create() +return (new PhpCsFixer\Config()) ->setRules(array( '@PHPUnit75Migration:risky' => true, '@Symfony' => true, '@Symfony:risky' => true, - 'array_syntax' => ['syntax' => 'short'], 'header_comment' => [ 'header' => <<setRules(array( '@Symfony' => true, '@Symfony:risky' => true, 'native_function_invocation' => false, - 'array_syntax' => ['syntax' => 'short'], )) ->setRiskyAllowed(true) ;