Skip to content

Cache Composer packages in the musl differential tests - #6942

Open
SanderMuller wants to merge 1 commit into
phpstan:2.3.xfrom
SanderMuller:musl-composer-cache
Open

SanderMuller wants to merge 1 commit into
phpstan:2.3.xfrom
SanderMuller:musl-composer-cache

Conversation

@SanderMuller

Copy link
Copy Markdown
Contributor

The musl differential test job runs composer install in an Alpine container with an empty cache. So each of its 20 legs downloads every package from GitHub, and one failed download fails the leg. This leg on #6932 failed when GitHub returned HTTP 504 for symfony/polyfill-intl-normalizer, after Composer retried the download.

The job now restores a Composer cache through actions/cache, keyed on composer.lock, next to the PHP build cache it already restores. COMPOSER_HOME stays a temporary directory, and the verified Composer download does not change.

I did not add the cache to turbo-compile-core-musl-arm64. That job runs composer install for the PGO training of the core that ships. The comment on the turbo-origins job excludes actions/cache from that path. Many packages in composer.lock have an empty shasum, so Composer cannot check a cached zip.

zizmor reports a cache-poisoning finding for the new step, the same finding it reports for the three alpine-php-cache steps.

🤖 Generated with Claude Code

The musl differential test job installs Composer packages inside an
Alpine container with an empty cache. Each of its 20 legs downloads every
package from GitHub, and one failed download fails the leg. A leg failed
on an HTTP 504 for symfony/polyfill-intl-normalizer, after Composer
retried the download.

The job now restores a Composer cache, keyed on composer.lock, the same
way it restores the PHP build. turbo-compile-core-musl-arm64 keeps its
uncached install, because the core it builds ships.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# tests ship nothing, so unlike turbo-compile-core-musl-arm64 they
# can trust a cache entry.
- name: "Restore the Composer cache"
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants