Skip to content
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
/compiler/vendor
/conf/config.local.yml
/build-cs
/build-infection
/infection.json5
/infection.phar
/vendor
/.idea/*
!.idea/icon.png
Expand Down
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,23 @@ name-collision:

composer-dependency-analyser:
php vendor/bin/composer-dependency-analyser --config build/composer-dependency-analyser.php

.PHONY: infection
infection:
git -C build-infection pull || git clone https://github.com/phpstan/build-infection.git
git -C build-infection fetch origin && git -C build-infection reset --hard origin/1.x
composer install --working-dir build-infection --no-interaction --no-progress
php build-infection/bin/infection-config.php --source-directory='build/PHPStan/Build'> infection.json5
XDEBUG_MODE=coverage php tests/vendor/bin/paratest \
--coverage-xml=tmp/coverage/coverage-xml \
--log-junit=tmp/coverage/junit.xml
version=$(shell jq -r '.packages[] | select(.name == "infection/infection") | .version' build-infection/composer.lock); \
wget https://github.com/infection/infection/releases/download/$$version/infection.phar --timestamping;
php infection.phar \
--configuration=infection.json5 \
--git-diff-base=origin/2.1.x \
--git-diff-lines \
--coverage=tmp/coverage \
--skip-initial-tests \
--ignore-msi-with-no-mutations \
--logger-text=php://stdout;
Loading