initialize phpstan with level 0

This commit is contained in:
tonis ormisson
2022-08-10 16:22:42 +03:00
parent ee4df79a63
commit d2f9afa7f3
4 changed files with 20 additions and 1 deletions

View File

@ -69,6 +69,9 @@ jobs:
- name: Run tests - name: Run tests
run: XDEBUG_MODE=coverage php vendor/bin/codecept run --coverage --coverage-xml run: XDEBUG_MODE=coverage php vendor/bin/codecept run --coverage --coverage-xml
- name: Run static code analysis
run: vendor/bin/phpstan analyse
- name: Archive failed tests artifacts - test output & log - name: Archive failed tests artifacts - test output & log
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
if: failure() if: failure()

View File

@ -61,7 +61,8 @@
"codeception/module-filesystem": "^1.0", "codeception/module-filesystem": "^1.0",
"codeception/module-yii2": "^1.1", "codeception/module-yii2": "^1.1",
"codeception/module-asserts": "^1.1", "codeception/module-asserts": "^1.1",
"codeception/module-db": "^1.0" "codeception/module-db": "^1.0",
"phpstan/phpstan": "^1.8"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -74,6 +75,9 @@
} }
}, },
"config": { "config": {
"platform": {
"php": "7.3"
},
"preferred-install": { "preferred-install": {
"*": "auto" "*": "auto"
}, },

8
phpstan.neon Normal file
View File

@ -0,0 +1,8 @@
parameters:
level: 0
paths:
- src
excludePaths:
- 'src/resources/i18n/*'
bootstrapFiles:
- stan_autoload.php

4
stan_autoload.php Normal file
View File

@ -0,0 +1,4 @@
<?php
// PHPStan fails to autoload Yii somehow
include 'vendor/yiisoft/yii2/Yii.php';