fix: add retry logic to composer install steps to resolve DNS timeout failures

Replace bare 'composer install' with ramsey/composer-install action (which
provides built-in retry, caching, and --prefer-dist) in code-quality.yml and
tests.yml. Add a 3-attempt shell retry loop in release.yml where --no-dev
--optimize-autoloader flags are required.

phpunit.yml already used ramsey/composer-install and is unaffected.

Closes #57
This commit is contained in:
2026-03-17 09:34:31 +00:00
parent 7eb7aedc39
commit fdebfcb986
3 changed files with 21 additions and 12 deletions

View File

@@ -28,11 +28,10 @@ jobs:
extensions: mbstring, intl, zip
tools: composer:v2
- name: Clear Composer Cache
run: composer clear-cache
- name: Install dependencies
run: composer install --prefer-dist --no-progress
uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
with:
composer-options: "--prefer-dist --no-progress"
- name: Run tests
run: ./vendor/bin/phpunit
@@ -54,11 +53,10 @@ jobs:
extensions: mbstring, intl, zip
tools: composer:v2, phpcs
- name: Clear Composer Cache
run: composer clear-cache
- name: Install dependencies
run: composer install --prefer-dist --no-progress
uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
with:
composer-options: "--prefer-dist --no-progress"
- name: Run PHPCS
run: composer run phpcs