From 570d7a70671d22e82fe2bac2601551b82ff83af3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Fri, 6 Dec 2024 01:04:51 +0100 Subject: [PATCH] Fix PHP 8.4 support --- .github/workflows/php-cs-fixer.yml | 2 -- .github/workflows/run-tests.yml | 2 +- .php_cs.dist.php => .php-cs-fixer.dist.php | 2 ++ src/Runtime/ParentRuntime.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename .php_cs.dist.php => .php-cs-fixer.dist.php (94%) diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml index 62f6106..25e82d5 100644 --- a/.github/workflows/php-cs-fixer.yml +++ b/.github/workflows/php-cs-fixer.yml @@ -14,8 +14,6 @@ jobs: - name: Run PHP CS Fixer uses: docker://oskarstark/php-cs-fixer-ga - with: - args: --config=.php_cs.dist.php --allow-risky=yes - name: Commit changes uses: stefanzweifel/git-auto-commit-action@v4 diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index e67da17..9b68cd2 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -9,7 +9,7 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] - php: [8.3, 8.2, 8.1, 8.0, 7.4] + php: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4] stability: [prefer-lowest, prefer-stable] name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }} diff --git a/.php_cs.dist.php b/.php-cs-fixer.dist.php similarity index 94% rename from .php_cs.dist.php rename to .php-cs-fixer.dist.php index 8d8a790..0c4b88c 100644 --- a/.php_cs.dist.php +++ b/.php-cs-fixer.dist.php @@ -7,10 +7,12 @@ ]) ->name('*.php') ->notName('*.blade.php') + ->notName('ClassWithSyntaxError.php') ->ignoreDotFiles(true) ->ignoreVCS(true); return (new PhpCsFixer\Config()) + ->setRiskyAllowed(true) ->setRules([ '@PSR12' => true, 'array_syntax' => ['syntax' => 'short'], diff --git a/src/Runtime/ParentRuntime.php b/src/Runtime/ParentRuntime.php index 85b8d06..33c2ce3 100644 --- a/src/Runtime/ParentRuntime.php +++ b/src/Runtime/ParentRuntime.php @@ -26,7 +26,7 @@ class ParentRuntime protected static $myPid = null; - public static function init(string $autoloader = null) + public static function init(?string $autoloader = null) { if (! $autoloader) { $existingAutoloaderFiles = array_filter([