From 8e8dca062078ae27fe09bcdae3ab838adb1db97b Mon Sep 17 00:00:00 2001 From: George Steel Date: Thu, 8 Oct 2026 17:01:56 +0100 Subject: [PATCH] Fix: Image ID not immediately available On first installation, running `make qa` fails because 'DOCKER_IMAGE_ID' is not yet populated even thought the image has been built. Using `DOCKER_IMAGE_NAME` instead means that targets run immediately after build don't fail. Signed-off-by: George Steel --- makefiles/PHPCodeSniffer.mk | 4 ++-- makefiles/PHPUnit.mk | 2 +- makefiles/Psalm.mk | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/makefiles/PHPCodeSniffer.mk b/makefiles/PHPCodeSniffer.mk index 2270939..d7f0986 100644 --- a/makefiles/PHPCodeSniffer.mk +++ b/makefiles/PHPCodeSniffer.mk @@ -23,12 +23,12 @@ ifeq ("$(HAS_PHPCS)","TRUE") phpcs: install @$(call MK_INFO,"Checking coding standards") - @$(DOCKER_RUN) ${DOCKER_IMAGE_ID} vendor/bin/phpcs + @$(DOCKER_RUN) $(DOCKER_IMAGE_NAME) vendor/bin/phpcs .PHONY: phpcs phpcbf: install @$(call MK_INFO,"Fixing coding standards") - @$(DOCKER_RUN) ${DOCKER_IMAGE_ID} vendor/bin/phpcbf + @$(DOCKER_RUN) $(DOCKER_IMAGE_NAME) vendor/bin/phpcbf .PHONY: phpcs ifneq ("$(PHPCS_CACHE_FILE)", "") diff --git a/makefiles/PHPUnit.mk b/makefiles/PHPUnit.mk index 88236fb..5fa91d0 100644 --- a/makefiles/PHPUnit.mk +++ b/makefiles/PHPUnit.mk @@ -18,7 +18,7 @@ ifeq ("$(HAS_PHPUNIT)","TRUE") HELP +=$(call MK_HELP,'test','Run PHPUnit tests') test: install - @$(DOCKER_RUN) ${DOCKER_IMAGE_ID} vendor/bin/phpunit + @$(DOCKER_RUN) $(DOCKER_IMAGE_NAME) vendor/bin/phpunit .PHONY: test clear-phpunit-cache: diff --git a/makefiles/Psalm.mk b/makefiles/Psalm.mk index af4a2c7..92f227d 100644 --- a/makefiles/Psalm.mk +++ b/makefiles/Psalm.mk @@ -30,13 +30,13 @@ ifeq ("$(HAS_PSALM)","TRUE") HELP +=$(call MK_HELP,'psalm','Run Psalm static analysis') psalm: install - @$(DOCKER_RUN) ${DOCKER_IMAGE_ID} vendor/bin/psalm + @$(DOCKER_RUN) $(DOCKER_IMAGE_NAME) vendor/bin/psalm .PHONY: psalm HELP +=$(call MK_HELP,'psalm-update-baseline','Update the Psalm baseline removing outdated issues') psalm-update-baseline: install ifneq ("$(wildcard ${PSALM_BASELINE})", "") - @$(DOCKER_RUN) ${DOCKER_IMAGE_ID} vendor/bin/psalm --update-baseline + @$(DOCKER_RUN) $(DOCKER_IMAGE_NAME) vendor/bin/psalm --update-baseline else @$(call MK_ERROR, "A Psalm baseline has not been configured. Run `set-psalm-baseline` first.") endif @@ -44,12 +44,12 @@ endif HELP +=$(call MK_HELP,'psalm-set-baseline','Add new issues to the Psalm baseline') psalm-set-baseline: install - @$(DOCKER_RUN) ${DOCKER_IMAGE_ID} vendor/bin/psalm --set-baseline=${PSALM_BASELINE} + @$(DOCKER_RUN) $(DOCKER_IMAGE_NAME) vendor/bin/psalm --set-baseline=${PSALM_BASELINE} .PHONY: psalm-set-baseline HELP +=$(call MK_HELP,'psalm-clear-cache','Clear the Psalm cache') psalm-clear-cache: install - @$(DOCKER_RUN) ${DOCKER_IMAGE_ID} vendor/bin/psalm --clear-cache + @$(DOCKER_RUN) $(DOCKER_IMAGE_NAME) vendor/bin/psalm --clear-cache .PHONY: psalm-clear-cache endif