Skip to content

Commit 158bd77

Browse files
committed
Fix php-cs-fixer
Package repos for Debian Buster were shut off, so we had to use newer base images
1 parent 886d988 commit 158bd77

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.php-cs-fixer.dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
ARG PHP_VERSION
2-
FROM php:${PHP_VERSION}-cli
1+
ARG IMAGE
2+
FROM ${IMAGE}
33

44
RUN apt-get update \
55
&& apt-get install --yes --no-install-recommends \

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ rector: vendor ## Automatic code fixes with Rector
1616
composer rector
1717

1818
define run-php-cs-fixer
19-
docker build --quiet --tag=graphql-php-cs-fixer-$(1) --build-arg=PHP_VERSION=$(1) --file=.php-cs-fixer.dockerfile .
20-
docker run --rm --volume="$(PWD):/app" graphql-php-cs-fixer-$(1) $(2)
19+
docker build --quiet --tag="graphql-php-cs-fixer-$(1)" --build-arg="IMAGE=$(1)" --file=.php-cs-fixer.dockerfile .
20+
docker run --rm --volume="$(PWD):/app" "graphql-php-cs-fixer-$(1)" $(2)
2121
endef
2222

2323
.PHONY: php-cs-fixer
2424
php-cs-fixer: ## Fix code style
25-
$(call run-php-cs-fixer,7.4)
26-
$(call run-php-cs-fixer,8.0,--path-mode=intersection src/Type/Definition/Deprecated.php src/Type/Definition/Description.php)
27-
$(call run-php-cs-fixer,8.1,--path-mode=intersection src/Type/Definition/PhpEnumType.php tests/Type/PhpEnumType)
25+
$(call run-php-cs-fixer,php:7.4-cli-bullseye)
26+
$(call run-php-cs-fixer,php:8.0-cli-bullseye,--path-mode=intersection src/Type/Definition/Deprecated.php src/Type/Definition/Description.php)
27+
$(call run-php-cs-fixer,php:8.1-cli-trixie,--path-mode=intersection src/Type/Definition/PhpEnumType.php tests/Type/PhpEnumType)
2828

2929
.PHONY: prettier
3030
prettier: ## Format code with prettier

0 commit comments

Comments
 (0)