diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 775b3389f..ae1b8b7ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,12 +12,18 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3'] + php-versions: ['8.0', '8.1', '8.2', '8.3'] coverage: ['pcov'] + code-style: ['yes'] code-analysis: ['no'] include: - php-versions: '7.4' - coverage: 'none' + coverage: 'pcov' + code-style: 'yes' + code-analysis: 'yes' + - php-versions: '8.4' + coverage: 'pcov' + code-style: 'yes' code-analysis: 'yes' steps: - name: Checkout @@ -48,8 +54,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 e981862b7..4d464eb3b 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 4e1aa271a..92743ebc9 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "sabre/xml" : "^3.0 || ^4.0" }, "require-dev" : { - "friendsofphp/php-cs-fixer": "^3.63", + "friendsofphp/php-cs-fixer": "^3.64", "phpunit/phpunit" : "^9.6", "phpunit/php-invoker" : "^2.0 || ^3.1", "phpstan/phpstan": "^1.12" @@ -94,7 +94,7 @@ "phpstan analyse lib tests --memory-limit 1G" ], "cs-fixer": [ - "php-cs-fixer fix" + "PHP_CS_FIXER_IGNORE_ENV=true php-cs-fixer fix" ], "phpunit": [ "phpunit --configuration tests/phpunit.xml"