@@ -28,16 +28,17 @@ PSALM_ARGS=--show-info=false
2828COMPOSER =$(PHP ) $(shell which composer)
2929
3030# Infection
31- INFECTION =vendor/bin/infection
32- MIN_MSI =52.212389380531
33- MIN_COVERED_MSI =95
31+ INFECTION =./.tools/infection.phar
32+ INFECTION_URL ="https://github.com/infection/infection/releases/download/0.24.0/infection.phar"
33+ MIN_MSI =78
34+ MIN_COVERED_MSI =98
3435INFECTION_ARGS=--min-msi =$(MIN_MSI ) --min-covered-msi=$(MIN_COVERED_MSI ) --threads=$(JOBS ) --log-verbosity=none --no-interaction --no-progress
3536
3637all : test
3738
3839cs :
3940 $(PHP_CS_FIXER ) fix $(PHP_CS_FIXER_ARGS ) --dry-run
40- LC_ALL=C sort -c -u .gitignore
41+ LC_ALL=C sort -u .gitignore -o .gitignore
4142
4243phpstan :
4344 $(PHPSTAN ) $(PHPSTAN_ARGS ) --no-progress
@@ -50,10 +51,10 @@ static-analyze: phpstan psalm
5051test-unit :
5152 $(PHPUNIT ) $(PHPUNIT_ARGS )
5253
53- test-e2e :
54+ test-e2e : $( INFECTION )
5455 tests/e2e_tests
5556
56- infection :
57+ infection : $( INFECTION )
5758 $(INFECTION ) $(INFECTION_ARGS )
5859
5960# #############################################################
@@ -92,7 +93,6 @@ prerequisites: build/cache vendor/autoload.php composer.lock infection.json.dist
9293# Do install if there's no 'vendor'
9394vendor/autoload.php :
9495 $(COMPOSER ) install --prefer-dist
95- test -d vendor/infection/infection/src/StreamWrapper/ && rm -fr vendor/infection/infection/src/StreamWrapper/ && $(COMPOSER ) dump-autoload || true
9696
9797# If composer.lock is older than `composer.json`, do update,
9898# and touch composer.lock because composer not always does that
@@ -101,3 +101,8 @@ composer.lock: composer.json
101101
102102build/cache :
103103 mkdir -p build/cache
104+
105+ $(INFECTION ) : Makefile
106+ wget -q $(INFECTION_URL ) --output-document=$(INFECTION )
107+ chmod a+x $(INFECTION )
108+ touch $@
0 commit comments