Skip to content

Commit 5cd387f

Browse files
committed
chore(MSP-5160): run phpstan under Infection as a mutant killer, in addition to PHPUnit
See https://infection.github.io/guide/static-analysis-integration.html In a nutshell: this will help killing more mutants if they violate PHPStan rules but don't trigger PHPUnit tests failures
1 parent c9702d2 commit 5cd387f

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"@lint:php"
6060
],
6161
"phpstan": [
62-
"phpstan analyse --memory-limit=-1 src/ tests/ rector.php --ansi --no-progress"
62+
"phpstan analyse --memory-limit=-1 --ansi --no-progress"
6363
],
6464
"rector:check": [
6565
"rector --dry-run --ansi --no-progress-bar"

infection.json5

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
"mutators": {
99
"@default": true
1010
},
11-
"maxTimeouts": 0
11+
"maxTimeouts": 0,
12+
staticAnalysisTool: 'phpstan'
1213
}

phpstan.neon

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ includes:
55
- phar://vendor/phpstan/phpstan/phpstan.phar/conf/bleedingEdge.neon
66

77
parameters:
8+
paths:
9+
- ./src
10+
- ./tests
11+
- ./rector.php
812
level: max
913
reportUnmatchedIgnoredErrors: false
1014
checkExplicitMixed: true
11-
15+
1216
ignoreErrors:
1317
- '#Dynamic call to static method PHPUnit\\Framework\\.*#'

0 commit comments

Comments
 (0)