@@ -4,14 +4,14 @@ SHELL=bash
44.PHONY : *
55
66CONTAINER_REGISTRY_REPO ="ghcr.io/wyrihaximusnet/php"
7- COMPOSER_SHOW_EXTENSION_LIST_PROD =$(shell composer show -t | grep -o "\-\-\(ext-\) .\+" | sort | uniq | cut -d- -f4- | tr -d '\n' | grep . | sed '/^$$/d' | xargs | sed -e 's/ /, /g' | tr -cd '[:alnum:],' | sed 's/.$$//')
8- COMPOSER_SHOW_EXTENSION_LIST_DEV =$(shell composer show -s | grep -o "\(ext-\) .\+" | sort | uniq | cut -d- -f2- | cut -d" " -f1 | xargs | sed -e 's/ /, /g' | tr -cd '[:alnum:],')
7+ COMPOSER_SHOW_EXTENSION_LIST_PROD =$(shell ((command -v docker >/dev/null 2>&1) && docker run --rm -v " ` pwd ` : ` pwd ` " -w ` pwd ` ${CONTAINER_REGISTRY_REPO}:8.4-nts-alpine-slim-dev composer show -t) | grep -o "\-\-\(ext-\).\+" | sort | uniq | cut -d- -f4- | tr -d '\n' | grep . | sed '/^$$/d' | xargs | sed -e 's/ /, /g' | tr -cd '[:alnum:],' | sed 's/.$$//')
8+ COMPOSER_SHOW_EXTENSION_LIST_DEV =$(shell ((command -v docker >/dev/null 2>&1) && docker run --rm -v " ` pwd ` : ` pwd ` " -w ` pwd ` ${CONTAINER_REGISTRY_REPO}:8.4-nts-alpine-slim-dev composer show -s) | grep -o "\(ext-\).\+" | sort | uniq | cut -d- -f2- | cut -d" " -f1 | xargs | sed -e 's/ /, /g' | tr -cd '[:alnum:],')
99COMPOSER_SHOW_EXTENSION_LIST =$(shell echo "${COMPOSER_SHOW_EXTENSION_LIST_PROD},${COMPOSER_SHOW_EXTENSION_LIST_DEV}")
1010SLIM_DOCKER_IMAGE =$(shell php -r 'echo count(array_intersect(["gd", "vips"], explode(",", "${COMPOSER_SHOW_EXTENSION_LIST}") )) > 0 ? "" : "-slim";')
1111NTS_OR_ZTS_DOCKER_IMAGE =$(shell php -r 'echo count(array_intersect(["parallel"], explode(",", "${COMPOSER_SHOW_EXTENSION_LIST}") )) > 0 ? "zts" : "nts";')
1212PHP_VERSION: =$(shell (((command -v docker >/dev/null 2>&1) && docker run --rm -v "` pwd ` :` pwd ` " ${CONTAINER_REGISTRY_REPO}:8.4-nts-alpine-slim php -r "echo json_decode(file_get_contents('` pwd ` /composer.json'), true)['config']['platform']['php'];") || echo "8.3") | php -r "echo str_replace('|', '.', explode('.', implode('|', explode('.', stream_get_contents(STDIN), 2)), 2)[0]);")
1313CONTAINER_NAME =$(shell echo "${CONTAINER_REGISTRY_REPO}:${PHP_VERSION}-${NTS_OR_ZTS_DOCKER_IMAGE}-alpine${SLIM_DOCKER_IMAGE}-dev")
14- COMPOSER_CACHE_DIR =$(shell composer config --global cache-dir -q || echo ${HOME}/.composer-php/cache)
14+ COMPOSER_CACHE_DIR =$(shell (command -v docker >/dev/null 2>&1) && docker run --rm -v " ` pwd ` : ` pwd ` " -w ` pwd ` ${CONTAINER_REGISTRY_REPO}:8.4-nts-alpine-slim-dev composer config --global cache-dir -q || echo ${HOME}/.composer-php/cache)
1515COMPOSER_CONTAINER_CACHE_DIR =$(shell ((command -v docker >/dev/null 2>&1) && docker run --rm -it ${CONTAINER_NAME} composer config --global cache-dir -q) || echo ${HOME}/.composer-php/cache)
1616
1717ifneq ("$(wildcard /.you-are-in-a-wyrihaximus.net-php-docker-image) ","")
@@ -69,10 +69,10 @@ unit-testing-raw: ## Run tests ##*D*## ####
6969 php vendor/phpunit/phpunit/phpunit --colors=always -c ./etc/qa/phpunit.xml --coverage-text --coverage-html ./var/tests-unit-coverage-html --coverage-clover ./var/tests-unit-clover-coverage.xml
7070
7171mutation-testing : # # Run mutation testing ##*LCH*##
72- $(DOCKER_RUN ) vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --threads=$(THREADS ) || (cat ./var/infection.log && false)
72+ $(DOCKER_RUN ) vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --configuration=./etc/qa/infection.json5 -- threads=$(THREADS ) || (cat ./var/infection.log && false)
7373
7474mutation-testing-raw : # # Run mutation testing ####
75- vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --threads=$(THREADS ) || (cat ./var/infection.log && false)
75+ vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --configuration=./etc/qa/infection.json5 -- threads=$(THREADS ) || (cat ./var/infection.log && false)
7676
7777composer-require-checker : # # Ensure we require every package used in this package directly ##*C*##
7878 $(DOCKER_RUN ) vendor/bin/composer-require-checker --ignore-parse-errors --ansi -vvv --config-file=./etc/qa/composer-require-checker.json
0 commit comments