From 0f34080c969da51e0d758ffbe342992d0010c857 Mon Sep 17 00:00:00 2001 From: Kevin Bond Date: Fri, 21 Jan 2022 16:09:30 -0500 Subject: [PATCH] upgrade php-cs-fixer used in gh action and run on php 8 --- .github/workflows/test.yaml | 7 +++---- .gitignore | 2 +- .php_cs.dist => .php-cs-fixer.dist.php | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) rename .php_cs.dist => .php-cs-fixer.dist.php (96%) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 66ef41c21cf..f7d65303f17 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -9,11 +9,10 @@ jobs: - uses: actions/checkout@master - uses: shivammathur/setup-php@v2 with: - php-version: '7.4' + php-version: '8.0' + tools: php-cs-fixer, cs2pr - name: php-cs-fixer - run: | - wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.18.2/php-cs-fixer.phar -q - php php-cs-fixer.phar fix --dry-run --diff + run: php-cs-fixer fix --dry-run --format=checkstyle | cs2pr coding-style-js: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 75eb9de11ad..f46bd1fe2b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.php_cs.cache +.php-cs-fixer.cache node_modules yarn.lock yarn-error.log diff --git a/.php_cs.dist b/.php-cs-fixer.dist.php similarity index 96% rename from .php_cs.dist rename to .php-cs-fixer.dist.php index 908086ea05f..a14f813bcd1 100644 --- a/.php_cs.dist +++ b/.php-cs-fixer.dist.php @@ -4,7 +4,7 @@ exit(0); } -return PhpCsFixer\Config::create() +return (new PhpCsFixer\Config()) ->setRules([ '@Symfony' => true, '@Symfony:risky' => true,