Skip to content

Commit 7e79e7e

Browse files
committed
6896: Rename global PHP var to PHP_EXEC to avoid shadowing test:run PHP parameter
The global PHP (docker compose exec command) was shadowing the test:run task's PHP parameter, so task test:run always used the global value and the default "8.3" never kicked in. Renaming to PHP_EXEC fixes task test:run and task test:run PHP=8.4 DEPS=lowest.
1 parent 67246c6 commit 7e79e7e

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

Taskfile.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ version: "3"
44

55
vars:
66
DOCKER_COMPOSE: "docker compose"
7-
PHP: "{{.DOCKER_COMPOSE}} exec phpfpm"
8-
COMPOSER: "{{.PHP}} composer"
7+
PHP_EXEC: "{{.DOCKER_COMPOSE}} exec phpfpm"
8+
COMPOSER: "{{.PHP_EXEC}} composer"
99

1010
tasks:
1111
default:
@@ -74,7 +74,7 @@ tasks:
7474
composer:check:
7575
desc: Validate and audit composer
7676
cmds:
77-
- "{{.PHP}} composer validate --strict"
77+
- "{{.PHP_EXEC}} composer validate --strict"
7878
- "{{.COMPOSER}} normalize --dry-run"
7979
- "{{.COMPOSER}} audit"
8080

@@ -90,12 +90,12 @@ tasks:
9090
lint:php:
9191
desc: Check PHP coding standards
9292
cmds:
93-
- "{{.PHP}} vendor/bin/php-cs-fixer fix --dry-run --diff"
93+
- "{{.PHP_EXEC}} vendor/bin/php-cs-fixer fix --dry-run --diff"
9494

9595
lint:php:fix:
9696
desc: Fix PHP coding standards
9797
cmds:
98-
- "{{.PHP}} vendor/bin/php-cs-fixer fix"
98+
- "{{.PHP_EXEC}} vendor/bin/php-cs-fixer fix"
9999

100100
lint:markdown:
101101
desc: Lint markdown files
@@ -122,19 +122,19 @@ tasks:
122122
analyze:php:
123123
desc: Run PHPStan static analysis
124124
cmds:
125-
- "{{.PHP}} vendor/bin/phpstan"
125+
- "{{.PHP_EXEC}} vendor/bin/phpstan"
126126

127127
# Testing
128128

129129
test:
130130
desc: Run tests
131131
cmds:
132-
- "{{.PHP}} vendor/bin/phpunit"
132+
- "{{.PHP_EXEC}} vendor/bin/phpunit"
133133

134134
test:coverage:
135135
desc: Run tests with coverage
136136
cmds:
137-
- "{{.PHP}} vendor/bin/phpunit --coverage-clover=coverage/unit.xml"
137+
- "{{.PHP_EXEC}} vendor/bin/phpunit --coverage-clover=coverage/unit.xml"
138138

139139
test:run:
140140
desc: "Run tests for a PHP version and dependency set (e.g. task test:run PHP=8.4 DEPS=lowest)"

0 commit comments

Comments
 (0)