Update default PHP version to 8.4 - #3127
Merged
Merged
Conversation
Collaborator
📊 Performance Test ResultsComparing e61ef83 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
bcotrim
approved these changes
Apr 17, 2026
bcotrim
left a comment
Contributor
There was a problem hiding this comment.
LGTM 👍
I confirm PHP 8.4 is not the default option when creating sites on Studio CLI and Studio app.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issues
How AI was used in this PR
AI updated tests and I reviewed it
Proposed Changes
We are updating the default PHP version to the version used by wpcom.
Pressable uses the latest - 8.5, but I think that it's better to be aligned with wpcom and use 8.4.
I also considered reusing the constant in tests to avoid a lot of changes in the future PHP updates, but here is the answer from Claude code, and I agree, that's why I decided to keep it as is.
Reuse the constant in tests — bumping the default in the future becomes a one-line change, no test churn. But tests become tautological: a test that does phpVersion: DEFAULT_PHP_VERSION then asserts expect(...).toBe(DEFAULT_PHP_VERSION) doesn't actually check that the right version flows through — it'd pass even if the default were broken.Keep hardcoded (current state) — tests act as a tripwire: bumping the default forces you to look at every place that depends on it, and assertions verify a concrete value end-to-end.My take: keep it hardcoded for assertions (they should pin concrete values).Testing Instructions
I tested pull/push/import db and full site/export db and full site/clicked on different buttons - evetrything works well.