diff --git a/Makefile b/Makefile index 67346d1..7a08865 100644 --- a/Makefile +++ b/Makefile @@ -4,14 +4,14 @@ SHELL=bash .PHONY: * CONTAINER_REGISTRY_REPO="ghcr.io/wyrihaximusnet/php" -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/.$$//') -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:],') +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/.$$//') +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:],') COMPOSER_SHOW_EXTENSION_LIST=$(shell echo "${COMPOSER_SHOW_EXTENSION_LIST_PROD},${COMPOSER_SHOW_EXTENSION_LIST_DEV}") SLIM_DOCKER_IMAGE=$(shell php -r 'echo count(array_intersect(["gd", "vips"], explode(",", "${COMPOSER_SHOW_EXTENSION_LIST}"))) > 0 ? "" : "-slim";') NTS_OR_ZTS_DOCKER_IMAGE=$(shell php -r 'echo count(array_intersect(["parallel"], explode(",", "${COMPOSER_SHOW_EXTENSION_LIST}"))) > 0 ? "zts" : "nts";') PHP_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]);") CONTAINER_NAME=$(shell echo "${CONTAINER_REGISTRY_REPO}:${PHP_VERSION}-${NTS_OR_ZTS_DOCKER_IMAGE}-alpine${SLIM_DOCKER_IMAGE}-dev") -COMPOSER_CACHE_DIR=$(shell composer config --global cache-dir -q || echo ${HOME}/.composer-php/cache) +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) COMPOSER_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) ifneq ("$(wildcard /.you-are-in-a-wyrihaximus.net-php-docker-image)","") @@ -69,10 +69,10 @@ unit-testing-raw: ## Run tests ##*D*## #### 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 mutation-testing: ## Run mutation testing ##*LCH*## - $(DOCKER_RUN) vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --threads=$(THREADS) || (cat ./var/infection.log && false) + $(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) mutation-testing-raw: ## Run mutation testing #### - vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --threads=$(THREADS) || (cat ./var/infection.log && false) + vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --configuration=./etc/qa/infection.json5 --threads=$(THREADS) || (cat ./var/infection.log && false) composer-require-checker: ## Ensure we require every package used in this package directly ##*C*## $(DOCKER_RUN) vendor/bin/composer-require-checker --ignore-parse-errors --ansi -vvv --config-file=./etc/qa/composer-require-checker.json diff --git a/composer.json b/composer.json index 394cdf8..1113220 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "require-dev": { "react-parallel/stubs": "^1.2", "wyrihaximus/async-test-utilities": "^9.3.0", - "wyrihaximus/makefiles": "^0.5.0", + "wyrihaximus/makefiles": "^0.7.0", "wyrihaximus/ticking-promise": "^3.1.0" }, "autoload": { diff --git a/composer.lock b/composer.lock index 63f797f..cc717ec 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "49a36c95d0ec8ef214c62e046d56144b", + "content-hash": "a41de296d3fffc7292f1a9d43a6b1272", "packages": [ { "name": "lcobucci/clock", @@ -9589,25 +9589,25 @@ }, { "name": "wyrihaximus/makefiles", - "version": "0.5.0", + "version": "0.7.0", "source": { "type": "git", "url": "https://github.com/WyriHaximus/Makefiles.git", - "reference": "5717bc0de6496a12734cf3f2de20859a692297f0" + "reference": "720618c4af497f5f06a6a53564eff39865c5a9e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/Makefiles/zipball/5717bc0de6496a12734cf3f2de20859a692297f0", - "reference": "5717bc0de6496a12734cf3f2de20859a692297f0", + "url": "https://api.github.com/repos/WyriHaximus/Makefiles/zipball/720618c4af497f5f06a6a53564eff39865c5a9e2", + "reference": "720618c4af497f5f06a6a53564eff39865c5a9e2", "shasum": "" }, "require": { "composer-plugin-api": "^2", - "ext-json": "^8.3", - "php": "^8.3" + "ext-json": "^8.4", + "php": "^8.4" }, "require-dev": { - "wyrihaximus/test-utilities": "^7.5.2" + "wyrihaximus/test-utilities": "^8.1.0" }, "type": "composer-plugin", "extra": { @@ -9628,10 +9628,10 @@ "email": "ceesjank@gmail.com" } ], - "description": "🛠️ Test utilities for api-clients packages", + "description": "🧱 Makefile building blocks", "support": { "issues": "https://github.com/WyriHaximus/Makefiles/issues", - "source": "https://github.com/WyriHaximus/Makefiles/tree/0.5.0" + "source": "https://github.com/WyriHaximus/Makefiles/tree/0.7.0" }, "funding": [ { @@ -9639,7 +9639,7 @@ "type": "github" } ], - "time": "2025-08-15T05:34:56+00:00" + "time": "2025-09-02T05:54:59+00:00" }, { "name": "wyrihaximus/phpstan-react",