Skip to content

Commit

Permalink
v3: implement phpstan in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
TonisOrmisson committed Feb 21, 2024
1 parent 2d274f8 commit 451dac1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['7.4', '8.0', '8.1', '8.2']
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3']

steps:
- uses: actions/checkout@v4
Expand All @@ -30,8 +30,11 @@ jobs:
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Install dependencies
- name: Run tests
run: vendor/bin/phpunit

- name: Run static code analysis
run: vendor/bin/phpstan --xdebug analyse
if: always()


2 changes: 2 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
parameters:
ignoreErrors:
9 changes: 9 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
includes:
- phpstan-baseline.neon
parameters:
level: 1
paths:
- src
- tests
bootstrapFiles:
- stan_autoload.php
4 changes: 4 additions & 0 deletions stan_autoload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php

// PHPStan fails to autoload Yii somehow
include_once 'vendor/yiisoft/yii2/Yii.php';

0 comments on commit 451dac1

Please sign in to comment.