From 0dbc8fd5406c08e9846caf90d35e332cc010109e Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 6 Sep 2024 14:15:02 +0545 Subject: [PATCH] add PHP 8.4 to CI --- .github/workflows/ci.yml | 11 +++++++++-- .php-cs-fixer.dist.php | 4 ++++ composer.json | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f780b0..56a8f16 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,9 +14,16 @@ jobs: matrix: php-versions: ['8.0', '8.1', '8.2', '8.3'] coverage: ['xdebug'] + code-style: ['yes'] code-analysis: ['no'] include: - php-versions: '7.4' + coverage: 'xdebug' + code-style: 'yes' + code-analysis: 'yes' + - php-versions: '8.4' + coverage: 'xdebug' + code-style: 'yes' code-analysis: 'yes' steps: - name: Checkout @@ -45,8 +52,8 @@ jobs: run: composer install --no-progress --prefer-dist --optimize-autoloader - name: Code Analysis (PHP CS-Fixer) - if: matrix.code-analysis == 'yes' - run: php vendor/bin/php-cs-fixer fix --dry-run --diff + if: matrix.code-style == 'yes' + run: PHP_CS_FIXER_IGNORE_ENV=true php vendor/bin/php-cs-fixer fix --dry-run --diff - name: Code Analysis (PHPStan) if: matrix.code-analysis == 'yes' diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index e981862..4d464eb 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -10,6 +10,10 @@ $config->setRules([ '@PSR1' => true, '@Symfony' => true, + 'nullable_type_declaration' => [ + 'syntax' => 'question_mark', + ], + 'nullable_type_declaration_for_default_null_value' => true, ]); return $config; diff --git a/composer.json b/composer.json index 50ccae1..98edcd7 100644 --- a/composer.json +++ b/composer.json @@ -53,7 +53,7 @@ "phpstan analyse lib tests" ], "cs-fixer": [ - "php-cs-fixer fix" + "PHP_CS_FIXER_IGNORE_ENV=true php-cs-fixer fix" ], "phpunit": [ "phpunit --configuration tests/phpunit.xml"