1
+ IS_PHP8: =$(shell php -r 'echo (int) version_compare(PHP_VERSION, "8.0", ">=");')
2
+
1
3
default : build
2
4
3
5
build : install test
@@ -25,24 +27,41 @@ test: vendor cs deptrac phpunit infection
25
27
test-min : update-min cs deptrac phpunit infection
26
28
.PHONY : test-min
27
29
30
+ ifeq ($(IS_PHP8 ) ,1)
31
+ test-package :
32
+ else
28
33
test-package : package test-package-tools
29
34
cd tests/phar && ./tools/phpunit
35
+ endif
30
36
.PHONY : test-package
31
37
38
+
39
+ ifeq ($(IS_PHP8 ) ,1)
40
+ cs :
41
+ else
32
42
cs : 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
34
45
.PHONY : cs
35
46
47
+ ifeq ($(IS_PHP8 ) ,1)
48
+ cs-fix :
49
+ else
36
50
cs-fix : tools/php-cs-fixer
37
51
PHP_CS_FIXER_IGNORE_ENV=1 tools/php-cs-fixer --allow-risky=yes --no-interaction --ansi fix
52
+ endif
38
53
.PHONY : cs-fix
39
54
40
55
deptrac : tools/deptrac
41
56
tools/deptrac --no-interaction --ansi --formatter-graphviz-display=0
42
57
.PHONY : deptrac
43
58
59
+ ifeq ($(IS_PHP8 ) ,1)
60
+ infection :
61
+ else
44
62
infection : 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
46
65
.PHONY : infection
47
66
48
67
phpunit : tools/phpunit
62
81
find tests/phar/tools -not -path ' */\.*' -type f -delete
63
82
.PHONY : clean
64
83
84
+ ifeq ($(IS_PHP8 ) ,1)
85
+ package :
86
+ else
65
87
package : tools/box
66
88
$(eval VERSION=$(shell (git describe --abbrev=0 --tags 2>/dev/null || echo "0.1-dev") | sed -e 's/^v//') )
67
89
@rm -rf build/phar && mkdir -p build/phar
@@ -77,6 +99,7 @@ package: tools/box
77
99
tools/box compile
78
100
79
101
@rm -rf build/phar
102
+ endif
80
103
.PHONY : package
81
104
82
105
vendor : install
@@ -90,16 +113,16 @@ tools/php-cs-fixer:
90
113
curl -Ls http://cs.sensiolabs.org/download/php-cs-fixer-v2.phar -o tools/php-cs-fixer && chmod +x tools/php-cs-fixer
91
114
92
115
tools/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
94
117
95
118
tools/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
97
120
98
121
tools/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
100
123
101
124
tools/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
103
126
104
127
tests/phar/tools/phpunit :
105
128
curl -Ls https://phar.phpunit.de/phpunit-9.phar -o tests/phar/tools/phpunit && chmod +x tests/phar/tools/phpunit
0 commit comments