Skip to content
Draft
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
/infection.json5
/infection.phar
/build-infection
/vendor
/.idea/*
!.idea/icon.png
Expand Down
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,15 @@ name-collision:

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

.PHONY: infection
infection:
git clone https://github.com/phpstan/build-infection.git || true
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
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 --no-clobber;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to download infection.phar, you can run infection from build-infection/vendor/bin/infection

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this beforehand, but it doesn't work. our generated config requires infection to run from the project root.

chmod +x infection.phar
php infection.phar --ignore-msi-with-no-mutations --logger-text=php://stdout
rm infection.json5 infection.phar
Loading