Skip to content

Commit 035f028

Browse files
authored
Merge pull request #8 from infection/feature/infection-phar
Upgrade to infection/abstract-codeception-adapter 0.5.0
2 parents 5ccf421 + 5b040d1 commit 035f028

File tree

11 files changed

+43
-532
lines changed

11 files changed

+43
-532
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
!/.tools/.gitkeep
12
.phpunit.result.cache
23
/.composer/
34
/.idea
45
/.php_cs.cache
6+
/.tools/
57
/build/
68
/infection.log
79
/vendor/

.tools/.gitkeep

Whitespace-only changes.

Makefile

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,17 @@ PSALM_ARGS=--show-info=false
2828
COMPOSER=$(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
3435
INFECTION_ARGS=--min-msi=$(MIN_MSI) --min-covered-msi=$(MIN_COVERED_MSI) --threads=$(JOBS) --log-verbosity=none --no-interaction --no-progress
3536

3637
all: test
3738

3839
cs:
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

4243
phpstan:
4344
$(PHPSTAN) $(PHPSTAN_ARGS) --no-progress
@@ -50,10 +51,10 @@ static-analyze: phpstan psalm
5051
test-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'
9394
vendor/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

102102
build/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 $@

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"require": {
2929
"php": "^7.4 || ^8.0",
30-
"infection/abstract-testframework-adapter": "^0.3.1",
30+
"infection/abstract-testframework-adapter": "^0.5.0",
3131
"infection/include-interceptor": "^0.2.0",
3232
"symfony/filesystem": "^3.4.29 || ^4.0 || ^5.0",
3333
"symfony/process": "^3.4.29 || ^4.0 || ^5.0",
@@ -40,7 +40,6 @@
4040
},
4141
"require-dev": {
4242
"friendsofphp/php-cs-fixer": "^2.18",
43-
"infection/infection": "^0.21.0",
4443
"php-coveralls/php-coveralls": "^2.4",
4544
"phpstan/extension-installer": "^1.1",
4645
"phpstan/phpstan": "^0.12.70",

0 commit comments

Comments
 (0)