Skip to content

Commit 4e82bbd

Browse files
Thavarshanclaude
andcommitted
Fix prefer-lowest CI build by using composer update
The --prefer-lowest flag only works with 'composer update', not 'composer install'. Split the install step into two conditional steps: - Regular install for stable builds - Update with --prefer-lowest for lowest dependency builds Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5a0b6b4 commit 4e82bbd

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,12 @@ jobs:
114114
${{ runner.os }}-php${{ matrix.php }}-composer-
115115
116116
- name: Install dependencies
117-
run: composer install --no-interaction --prefer-dist --optimize-autoloader ${{ matrix.stability == 'prefer-lowest' && '--prefer-lowest' || '' }} ${{ matrix.os == 'windows-latest' && '--ignore-platform-req=ext-pcntl' || '' }}
117+
if: matrix.stability != 'prefer-lowest'
118+
run: composer install --no-interaction --prefer-dist --optimize-autoloader ${{ matrix.os == 'windows-latest' && '--ignore-platform-req=ext-pcntl' || '' }}
119+
120+
- name: Install dependencies (prefer-lowest)
121+
if: matrix.stability == 'prefer-lowest'
122+
run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-lowest ${{ matrix.os == 'windows-latest' && '--ignore-platform-req=ext-pcntl' || '' }}
118123

119124
- name: Execute tests
120125
run: composer test

0 commit comments

Comments
 (0)