initialize phpstan with level 0
This commit is contained in:
3
.github/workflows/php.yml
vendored
3
.github/workflows/php.yml
vendored
@ -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()
|
||||||
|
|||||||
@ -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
8
phpstan.neon
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
parameters:
|
||||||
|
level: 0
|
||||||
|
paths:
|
||||||
|
- src
|
||||||
|
excludePaths:
|
||||||
|
- 'src/resources/i18n/*'
|
||||||
|
bootstrapFiles:
|
||||||
|
- stan_autoload.php
|
||||||
4
stan_autoload.php
Normal file
4
stan_autoload.php
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// PHPStan fails to autoload Yii somehow
|
||||||
|
include 'vendor/yiisoft/yii2/Yii.php';
|
||||||
Reference in New Issue
Block a user