1+ IS_PHP8: =$(shell php -r 'echo (int) version_compare(PHP_VERSION, "8.0", ">=");')
2+
13default : build
24
35build : install test
@@ -25,24 +27,41 @@ test: vendor cs deptrac phpunit infection
2527test-min : update-min cs deptrac phpunit infection
2628.PHONY : test-min
2729
30+ ifeq ($(IS_PHP8 ) ,1)
31+ test-package :
32+ else
2833test-package : package test-package-tools
2934 cd tests/phar && ./tools/phpunit
35+ endif
3036.PHONY : test-package
3137
38+
39+ ifeq ($(IS_PHP8 ) ,1)
40+ cs :
41+ else
3242cs : tools/php-cs-fixer
33- PHP_CS_FIXER_IGNORE_ENV=1 tools/php-cs-fixer --dry-run --allow-risky=yes --no-interaction --ansi fix
43+ PHP_CS_FIXER_IGNORE_ENV=1 tools/php-cs-fixer --dry-run --allow-risky=yes --no-interaction --ansi --diff fix
44+ endif
3445.PHONY : cs
3546
47+ ifeq ($(IS_PHP8 ) ,1)
48+ cs-fix :
49+ else
3650cs-fix : tools/php-cs-fixer
3751 PHP_CS_FIXER_IGNORE_ENV=1 tools/php-cs-fixer --allow-risky=yes --no-interaction --ansi fix
52+ endif
3853.PHONY : cs-fix
3954
4055deptrac : tools/deptrac
4156 tools/deptrac --no-interaction --ansi --formatter-graphviz-display=0
4257.PHONY : deptrac
4358
59+ ifeq ($(IS_PHP8 ) ,1)
60+ infection :
61+ else
4462infection : tools/infection tools/infection.pubkey
45- phpdbg -qrr ./tools/infection --no-interaction --formatter=progress --min-msi=100 --min-covered-msi=100 --only-covered --ansi
63+ phpdbg -qrr ./tools/infection --no-interaction --formatter=progress --min-msi=95 --min-covered-msi=95 --only-covered --ansi
64+ endif
4665.PHONY : infection
4766
4867phpunit : tools/phpunit
6281 find tests/phar/tools -not -path ' */\.*' -type f -delete
6382.PHONY : clean
6483
84+ ifeq ($(IS_PHP8 ) ,1)
85+ package :
86+ else
6587package : tools/box
6688 $(eval VERSION=$(shell (git describe --abbrev=0 --tags 2>/dev/null || echo "0.1-dev") | sed -e 's/^v//') )
6789 @rm -rf build/phar && mkdir -p build/phar
@@ -77,6 +99,7 @@ package: tools/box
7799 tools/box compile
78100
79101 @rm -rf build/phar
102+ endif
80103.PHONY : package
81104
82105vendor : install
@@ -90,16 +113,16 @@ tools/php-cs-fixer:
90113 curl -Ls http://cs.sensiolabs.org/download/php-cs-fixer-v2.phar -o tools/php-cs-fixer && chmod +x tools/php-cs-fixer
91114
92115tools/deptrac :
93- curl -Ls http ://get. sensiolabs.de /deptrac.phar -o tools/deptrac && chmod +x tools/deptrac
116+ curl -Ls https ://github.com/ sensiolabs-de/deptrac/releases/download/0.10.0 /deptrac.phar -o tools/deptrac && chmod +x tools/deptrac
94117
95118tools/infection : tools/infection.pubkey
96- curl -Ls https://github.com/infection/infection/releases/download/0.16.1 /infection.phar -o tools/infection && chmod +x tools/infection
119+ curl -Ls https://github.com/infection/infection/releases/download/0.20.2 /infection.phar -o tools/infection && chmod +x tools/infection
97120
98121tools/infection.pubkey :
99- curl -Ls https://github.com/infection/infection/releases/download/0.16.1 /infection.phar.pubkey -o tools/infection.pubkey
122+ curl -Ls https://github.com/infection/infection/releases/download/0.20.2 /infection.phar.pubkey -o tools/infection.pubkey
100123
101124tools/box :
102- curl -Ls https://github.com/humbug/box/releases/download/3.8.4 /box.phar -o tools/box && chmod +x tools/box
125+ curl -Ls https://github.com/humbug/box/releases/download/3.10.0 /box.phar -o tools/box && chmod +x tools/box
103126
104127tests/phar/tools/phpunit :
105128 curl -Ls https://phar.phpunit.de/phpunit-9.phar -o tests/phar/tools/phpunit && chmod +x tests/phar/tools/phpunit
0 commit comments