From 9b5305dee5229093eb4efa80a74c0c4227018851 Mon Sep 17 00:00:00 2001 From: Beatrycze Volk Date: Fri, 19 Jun 2026 13:51:26 +0200 Subject: [PATCH] [MAINTENANCE] Update PHPStan workflow to support multiple PHP versions This configures the GitHub Actions workflow to run static code analysis against PHP 7.4, 8.2, and 8.4, improving compatibility checks. It also updates the `checkout` and `composer` actions to their latest versions. --- .github/workflows/phpstan.yml | 8 ++++++-- composer.json | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 35c5266..7d5e13d 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -8,16 +8,20 @@ on: jobs: phpstan: + name: Static Code Analysis runs-on: ubuntu-latest + strategy: + matrix: + variants: [{ php: 7.4 }, { php: 8.2 }, { php: 8.4 } ] steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install dependencies uses: php-actions/composer@v6 with: command: update - php_version: "7.4" + php_version: ${{ matrix.variants.php }} - name: PHPStan Static Analysis uses: php-actions/phpstan@v3 diff --git a/composer.json b/composer.json index 590b3f9..0ae4bf5 100644 --- a/composer.json +++ b/composer.json @@ -11,6 +11,7 @@ "php": ">=7.4" }, "require-dev": { + "phpstan/phpstan": "^1.12", "phpunit/phpunit": "~9.6" }, "autoload": {