Skip to content

Update setup-php to 2.40.0 to fix macOS CI - #296

Merged
oschwald merged 1 commit into
mainfrom
wstorey/eng-5610-geoip2-php-fix-macos-ci-by-updating-setup-php-to-2400
Oct 11, 2026
Merged

oschwald merged 1 commit into
mainfrom
wstorey/eng-5610-geoip2-php-fix-macos-ci-by-updating-setup-php-to-2400

Conversation

@horgh

@horgh horgh commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

The scheduled PHPUnit workflow fails on macos-latest in the "Setup PHP" step (run 38111622074). The PHP 8.5 job fails with Could not setup PHP 8.5, and the other macOS jobs are cancelled.

Cause

setup-php 2.37.2 installs PHP on macOS from the live shivammathur/php Homebrew tap. It resets Homebrew to origin/main, sets HOMEBREW_NO_INSTALL_FROM_API=1, and hides the brew output. Homebrew changes from 2026-10-07 to 2026-10-09 broke this path. setup-php 2.40.0 fixes it:

The same update for GeoIP2-php is maxmind/GeoIP2-php#351.

Change

Pin shivammathur/setup-php to 2.40.0 in test.yml and lint.yml. Dependabot's 7-day cooldown would delay this update until 2026-10-19.

ENG-5610

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated the PHP setup used in linting and test workflows.

setup-php 2.37.2 installs PHP on macOS from the live Homebrew tap. It
resets Homebrew to origin/main and hides the brew output. Homebrew
changes from 2026-10-07 to 2026-10-09 broke this path, and the PHP 8.5
macOS job fails with "Could not setup PHP 8.5".

setup-php 2.40.0 resolves tap formula aliases before it calls brew and
uses the Homebrew API when homebrew-core is not tapped. It also installs
prebuilt PHP builds on macOS.

Dependabot's 7-day cooldown would delay this update until 2026-10-19.

ENG-5610

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 11, 2026 15:47
@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 74fbeafa-cbdd-47e1-abb3-e68e580c6168

📥 Commits

Reviewing files that changed from the base of the PR and between 08d9804 and ebb21bf.


📒 Files selected for processing (2)
  • .github/workflows/lint.yml
  • .github/workflows/test.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.



📝 Walkthrough

Walkthrough

The lint and PHPUnit workflows now pin shivammathur/setup-php to version 2.40.0 instead of version 2.37.2.

Changes

PHP workflow updates

Layer / File(s) Summary
Update setup-php pins
.github/workflows/lint.yml, .github/workflows/test.yml
Both workflows update their shivammathur/setup-php pins from version 2.37.2 to version 2.40.0.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix


Merge Risk: ⚪ Minimal · up to ebb21

The change updates the PHP setup action in both workflows, with no identified merge-blocking concern.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: updating setup-php to version 2.40.0 to address macOS CI failures.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the workflow pins,
And finds new PHP setup begins.
Two files now point to version two-forty,
The lint and tests proceed quite neatly.
I hop away beneath the moon,
With updated pins in tune.

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The verified 2.40.0 pin is correct and consistently replaces all existing setup-php references.

0 open findings

What changed in this PR

Updates the PHP setup action to restore macOS CI compatibility.

Changes:

  • Pins setup-php 2.40.0 by its verified commit SHA.
  • Applies the update consistently to test and lint workflows.
File Description
.github/​workflows/​test.yml Updates PHP setup across the test matrix.
.github/​workflows/​lint.yml Updates PHP setup for lint checks.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@oschwald
oschwald merged commit 20fe7a9 into main Oct 11, 2026
40 checks passed
@oschwald
oschwald deleted the wstorey/eng-5610-geoip2-php-fix-macos-ci-by-updating-setup-php-to-2400 branch October 11, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants