Skip to content

Commit 803cdee

Browse files
committed
Use local install of friendsofphp/php-cs-fixer
Otherwise, `composer check` and `composer fix` are broken and contributing becomes much harder than it should be. Also using the same version everywhere is a benefit to get consistent result locally and on CI.
1 parent 25de4b8 commit 803cdee

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,11 @@ jobs:
7979
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
8080
restore-keys: ${{ runner.os }}-composer-
8181

82-
- name: Composer Install
83-
run: composer global require friendsofphp/php-cs-fixer
84-
85-
- name: Add environment path
86-
run: export PATH="$PATH:$HOME/.composer/vendor/bin"
82+
- name: Install dependencies
83+
run: composer install --no-progress --prefer-dist --optimize-autoloader
8784

8885
- name: Code style with PHP-CS-Fixer
89-
run: php-cs-fixer fix --dry-run --diff
86+
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff
9087

9188
coverage:
9289
runs-on: ubuntu-latest

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@
7373
"phpmd/phpmd": "^2.13",
7474
"phpunit/phpunit": ">=7.0",
7575
"tecnickcom/tcpdf": "^6.5",
76-
"symfony/process": "^4.4"
76+
"symfony/process": "^4.4",
77+
"friendsofphp/php-cs-fixer": "^3.3"
7778
},
7879
"suggest": {
7980
"ext-zip": "Allows writing OOXML and ODF",

0 commit comments

Comments
 (0)