Skip to content

Commit 59076a8

Browse files
ckrackampagent
andcommitted
chore: upgrade php-cs-fixer to ^3.94 and replace deprecated PHP_CS_FIXER_IGNORE_ENV with --allow-unsupported-php-version
Amp-Thread-ID: https://ampcode.com/threads/T-019ce816-ebc4-7094-85ad-8b2e8a20f11a Co-authored-by: Amp <amp@ampcode.com>
1 parent 28105ca commit 59076a8

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313

1414
- id: php-cs-fixer
1515
name: php-cs-fixer
16-
entry: docker compose run --no-TTY --rm --no-deps -ePHP_CS_FIXER_IGNORE_ENV=1 php vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --path-mode=intersection
16+
entry: docker compose run --no-TTY --rm --no-deps php vendor/bin/php-cs-fixer fix --allow-unsupported-php-version=yes --config=.php-cs-fixer.dist.php --path-mode=intersection
1717
language: system
1818
types_or:
1919
- php

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ static: ## run static analysis
2828

2929
.PHONY: cs
3030
cs: ## run php-cs-fixer in check mode
31-
@$(dc) run -ePHP_CS_FIXER_IGNORE_ENV=1 --rm --no-deps php vendor/bin/php-cs-fixer check --using-cache=no --show-progress=none
31+
@$(dc) run --rm --no-deps php vendor/bin/php-cs-fixer check --allow-unsupported-php-version=yes --using-cache=no --show-progress=none
3232

3333
.PHONY: fix
3434
fix: ## fix code style
35-
@$(dc) run -ePHP_CS_FIXER_IGNORE_ENV=1 --rm --no-deps php vendor/bin/php-cs-fixer fix
35+
@$(dc) run --rm --no-deps php vendor/bin/php-cs-fixer fix --allow-unsupported-php-version=yes
3636

3737
.PHONY: check
3838
check: composer-validate cs static test ## run all local checks

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"symfony/uid": "^6.4 || ^7.4 || ^8.0"
2222
},
2323
"require-dev": {
24-
"friendsofphp/php-cs-fixer": "^3.75",
24+
"friendsofphp/php-cs-fixer": "^3.94",
2525
"phpstan/phpstan": "^2.1",
2626
"phpunit/phpunit": "^11.5"
2727
},

0 commit comments

Comments
 (0)