Skip to content

Commit e551086

Browse files
committed
Avoid installing php-cs-fixer on legacy versions
1 parent db6e3f6 commit e551086

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@ jobs:
1111
include:
1212
- operating-system: 'ubuntu-latest'
1313
php-version: '7.1'
14+
style-fix: 'none'
1415

1516
- operating-system: 'ubuntu-latest'
1617
php-version: '7.2'
18+
style-fix: 'none'
1719

1820
- operating-system: 'ubuntu-latest'
1921
php-version: '7.3'
22+
style-fix: 'none'
2023

2124
- operating-system: 'ubuntu-latest'
2225
php-version: '7.4'
@@ -67,6 +70,10 @@ jobs:
6770
composer-${{ runner.os }}-
6871
composer-
6972
73+
- name: Remove php-cs-fixer if not needed
74+
run: composer remove --dev --no-update amphp/php-cs-fixer-config
75+
if: matrix.style-fix == 'none'
76+
7077
- name: Install dependencies
7178
uses: nick-invision/retry@v2
7279
with:
@@ -82,5 +89,6 @@ jobs:
8289

8390
- name: Run style fixer
8491
run: vendor/bin/php-cs-fixer --diff --dry-run -v fix
92+
if: matrix.style-fix != 'none'
8593
env:
8694
PHP_CS_FIXER_IGNORE_ENV: 1

0 commit comments

Comments
 (0)