Skip to content

Commit 7b2d224

Browse files
committed
Enable PHPStan for infection
1 parent 720618c commit 7b2d224

File tree

4 files changed

+338
-223
lines changed

4 files changed

+338
-223
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ cs: ## Check the code for code style issues ##*LCH*##
6060
$(DOCKER_RUN) vendor/bin/phpcs --parallel=1 --cache=./var/.phpcs.cache.json --standard=./etc/qa/phpcs.xml
6161

6262
stan: ## Run static analysis (PHPStan) ##*LCH*##
63-
$(DOCKER_RUN) vendor/bin/phpstan analyse etc src tests --level max --ansi -c ./etc/qa/phpstan.neon
63+
$(DOCKER_RUN) vendor/bin/phpstan analyse etc src tests --level max --ansi --configuration=./etc/qa/phpstan.neon
6464

6565
unit-testing: ## Run tests ##*A*##
6666
$(DOCKER_RUN) vendor/bin/phpunit --colors=always -c ./etc/qa/phpunit.xml --coverage-text --coverage-html ./var/tests-unit-coverage-html --coverage-clover ./var/tests-unit-clover-coverage.xml
@@ -69,10 +69,10 @@ unit-testing-raw: ## Run tests ##*D*## ####
6969
php vendor/phpunit/phpunit/phpunit --colors=always -c ./etc/qa/phpunit.xml --coverage-text --coverage-html ./var/tests-unit-coverage-html --coverage-clover ./var/tests-unit-clover-coverage.xml
7070

7171
mutation-testing: ## Run mutation testing ##*LCH*##
72-
$(DOCKER_RUN) vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --configuration=./etc/qa/infection.json5 --threads=$(THREADS) || (cat ./var/infection.log && false)
72+
$(DOCKER_RUN) vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --configuration=./etc/qa/infection.json5 --static-analysis-tool=phpstan --static-analysis-tool-options="--level max --memory-limit=-1" --threads=$(THREADS) || (cat ./var/infection.log && false)
7373

7474
mutation-testing-raw: ## Run mutation testing ####
75-
vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --configuration=./etc/qa/infection.json5 --threads=$(THREADS) || (cat ./var/infection.log && false)
75+
vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --configuration=./etc/qa/infection.json5 --static-analysis-tool=phpstan --static-analysis-tool-options="--level max --memory-limit=-1" --threads=$(THREADS) || (cat ./var/infection.log && false)
7676

7777
composer-require-checker: ## Ensure we require every package used in this package directly ##*C*##
7878
$(DOCKER_RUN) vendor/bin/composer-require-checker --ignore-parse-errors --ansi -vvv --config-file=./etc/qa/composer-require-checker.json

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
"require-dev": {
1818
"wyrihaximus/test-utilities": "^8.1.0"
1919
},
20+
"conflict": {
21+
"infection/infection": "<0.31.2"
22+
},
2023
"autoload": {
2124
"psr-4": {
2225
"WyriHaximus\\Makefiles\\": "src"

0 commit comments

Comments
 (0)