Skip to content

Commit aafdc1c

Browse files
committed
CI: run PHPStan via shivammathur/setup-php tool, not php-actions/phpstan
php-actions/phpstan@v3 defaults to version=composer and expects phpstan in the project's dev-deps. We don't pull phpstan in via composer, so the job errored with 'Trying to use version installed by Composer, but there is no file at'. Switch to installing phpstan 1.12 via shivammathur/setup-php tools and invoke it directly with -a vendor/autoload.php so it can resolve Defuse classes.
1 parent 3238c2f commit aafdc1c

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,10 @@ jobs:
6161
uses: shivammathur/setup-php@v2
6262
with:
6363
php-version: '8.3'
64-
tools: composer:v2
64+
tools: composer:v2, phpstan:1.12
6565

6666
- name: Install dependencies
6767
run: composer install --prefer-dist --no-progress --no-interaction
6868

6969
- name: PHPStan Static Analysis
70-
uses: php-actions/phpstan@v3
71-
with:
72-
path: php/
73-
php_version: 8.3
74-
level: 2
70+
run: phpstan analyse php/ --level=2 --no-progress -a vendor/autoload.php

0 commit comments

Comments
 (0)