Skip to content

Update default PHP version to 8.4 - #3127

Merged
nightnei merged 1 commit into
trunkfrom
updateDefaultPhpVersionTo84
Apr 20, 2026
Merged

Update default PHP version to 8.4#3127
nightnei merged 1 commit into
trunkfrom
updateDefaultPhpVersionTo84

Conversation

@nightnei

@nightnei nightnei commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

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

  1. Try to create a site and assert that 8.4 is preselected during creation flow and is indeed selected when a site is created (just checking it in site settings inside Studio is enough).
  2. Holistically test Studio to asert that everythign works well with 8.4 (previously we had a lot of issues with 8.5, so theoretically that something can be broken, e.g. pull/push/import/export/some UI notifications/etc)

I tested pull/push/import db and full site/export db and full site/clicked on different buttons - evetrything works well.

@nightnei
nightnei requested a review from a team April 17, 2026 11:39
@nightnei nightnei self-assigned this Apr 17, 2026
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing e61ef83 vs trunk

app-size

Metric trunk e61ef83 Diff Change
App Size (Mac) 1283.00 MB 1283.00 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk e61ef83 Diff Change
load 1928 ms 1838 ms 90 ms 🟢 -4.7%

site-startup

Metric trunk e61ef83 Diff Change
siteCreation 8113 ms 8135 ms +22 ms ⚪ 0.0%
siteStartup 4291 ms 4958 ms +667 ms 🔴 15.5%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@bcotrim bcotrim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍
I confirm PHP 8.4 is not the default option when creating sites on Studio CLI and Studio app.

@nightnei
nightnei merged commit 19b40a7 into trunk Apr 20, 2026
17 of 18 checks passed
@nightnei
nightnei deleted the updateDefaultPhpVersionTo84 branch April 20, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants