Skip to content

ci: fallback on static-php.dev mirror when php.net is down#2233

Open
dunglas wants to merge 5 commits intomainfrom
ci/php-api-fallback
Open

ci: fallback on static-php.dev mirror when php.net is down#2233
dunglas wants to merge 5 commits intomainfrom
ci/php-api-fallback

Conversation

@dunglas
Copy link
Member

@dunglas dunglas commented Mar 3, 2026

Unfortunately, GitHub Actions is often blocked by the php.net CDN. This patch adds a fallback to use GitHub to try to determine the PHP version to use. This is less ideal because PHP currently doesn't use GitHub extensively, and distribution archives aren't available in the GitHub releases, only on php.net.

Copilot AI review requested due to automatic review settings March 3, 2026 09:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves CI resilience when php.net’s releases API is unavailable (e.g., blocked by the php.net CDN) by adding a fallback mechanism to infer the latest PHP patch version via GitHub.

Changes:

  • Add php.net → GitHub (gh) fallback logic to determine the latest PHP version when PHP_VERSION isn’t set.
  • Update the sanitizers workflow to use the same fallback and to handle fetching either php.net .xz archives or GitHub .tar.gz archives.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
build-static.sh Adds php.net API lookup with a GitHub (gh) fallback to resolve the latest patch version for a given minor series.
.github/workflows/sanitizers.yaml Adds fallback logic for determining the PHP version and adjusts extraction to support GitHub tarballs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dunglas dunglas force-pushed the ci/php-api-fallback branch from 09980a4 to a809afc Compare March 5, 2026 15:15
@dunglas dunglas changed the title ci: fallback on gh when the php.net API is down ci: fallback on static-php.dev mirror when php.net is down Mar 5, 2026
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.

5 participants