Skip to content

Commit a34051c

Browse files
authored
Have PHP_CS_FIXER_IGNORE_ENV only in a single place (#1024)
1 parent 50e070e commit a34051c

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ concurrency:
1313
jobs:
1414
analyse:
1515
runs-on: ubuntu-latest
16-
env:
17-
PHP_CS_FIXER_IGNORE_ENV: 1
1816
steps:
1917
- uses: actions/checkout@v4
2018
- uses: shivammathur/setup-php@v2
@@ -126,11 +124,8 @@ jobs:
126124
- run: composer update --no-progress --classmap-authoritative ${{ matrix.composer-flags }}
127125

128126
- if: matrix.install-phpunit-12
129-
env:
130-
PHP_CS_FIXER_IGNORE_ENV: 1
131127
run: |
132-
composer install-dev-tools
133-
./vendor/bin/php-cs-fixer fix --quiet --rules=php_unit_attributes
128+
composer apply-php_unit_attributes
134129
135130
- run: composer show | grep php-cs-fixer
136131

composer.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,25 @@
3131
},
3232
"scripts": {
3333
"analyse": [
34-
"@install-dev-tools",
34+
"@prepare-dev-tools",
3535
"php-cs-fixer check --ansi --show-progress=dots --diff --verbose",
3636
"@composer --no-interaction --working-dir=.dev-tools analyse"
3737
],
38+
"apply-php_unit_attributes": [
39+
"@prepare-dev-tools",
40+
"php-cs-fixer fix --quiet --rules=php_unit_attributes || exit 0"
41+
],
3842
"fix": [
39-
"@install-dev-tools",
43+
"@prepare-dev-tools",
4044
"php-cs-fixer fix --ansi --verbose || exit 0",
4145
"@composer --no-interaction --working-dir=.dev-tools fix"
4246
],
4347
"infection": [
44-
"@install-dev-tools",
48+
"@prepare-dev-tools",
4549
"@composer --working-dir=.dev-tools infection"
4650
],
47-
"install-dev-tools": [
51+
"prepare-dev-tools": [
52+
"@putenv PHP_CS_FIXER_IGNORE_ENV=1",
4853
"@composer --working-dir=.dev-tools --quiet install --classmap-authoritative"
4954
],
5055
"test": [

0 commit comments

Comments
 (0)