Skip to content

Load native PHP extensions properly on Windows#3471

Merged
fredrikekelund merged 39 commits into
trunkfrom
f26d/load-xdebug
May 19, 2026
Merged

Load native PHP extensions properly on Windows#3471
fredrikekelund merged 39 commits into
trunkfrom
f26d/load-xdebug

Conversation

@fredrikekelund
Copy link
Copy Markdown
Contributor

@fredrikekelund fredrikekelund commented May 13, 2026

Related issues

How AI was used in this PR

Claude drove the entire implementation based on a detailed spec from me.

Proposed Changes

#3439 changes the structure of the PHP package for Windows so that the extensions are no longer static but are distributed as separate DLL files. To account for this, we need to tell PHP where to find the extension files and to activate them. This PR does that.

This PR also activates Xdebug when the enableXdebug config is true.

Testing Instructions

  1. Be on Windows
  2. Download the Windows build from here
  3. Extract it to C:\Users\USERNAME\.studio\php-bin\8.4 (replace the existing content)
  4. npx cross-env STUDIO_RUNTIME=native-php npm start
  5. Create a new site with PHP 8.4
  6. Ensure that it starts as expected
  7. Activate Xdebug in the site settings
  8. Ensure that it works (you can add a phpinfo.php file in the site root and put a phpinfo() call in there for verification)

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@fredrikekelund fredrikekelund requested a review from bcotrim May 13, 2026 14:05
@fredrikekelund fredrikekelund self-assigned this May 13, 2026
@fredrikekelund fredrikekelund changed the title Load PHP extensions properly on Windows Load native PHP extensions properly on Windows May 13, 2026
Copy link
Copy Markdown
Contributor

@bcotrim bcotrim left a comment

Choose a reason for hiding this comment

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

I tested this and couldn't get the site to run in Windows using Studio app.

The failure I’m seeing appears to be unrelated to the extension-loading changes in this PR. It only happens when creating a site through Studio’s “Empty site” flow, using studio CLI directly works.
It appears to be related to running blueprints, are you able to replicate this issue?

Base automatically changed from rsm-2698-build-php-with-xdebug to trunk May 19, 2026 05:35
@fredrikekelund
Copy link
Copy Markdown
Contributor Author

To connect the dots: #3491 fixes the issue @bcotrim found with blueprints.

@fredrikekelund fredrikekelund merged commit dbb7965 into trunk May 19, 2026
6 of 10 checks passed
@fredrikekelund fredrikekelund deleted the f26d/load-xdebug branch May 19, 2026 05:38
@wpmobilebot
Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 2cd6ea0 vs trunk

app-size

Metric trunk 2cd6ea0 Diff Change
App Size (Mac) 1354.95 MB 1354.95 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk 2cd6ea0 Diff Change
load 1471 ms 1498 ms +27 ms ⚪ 0.0%

site-startup

Metric trunk 2cd6ea0 Diff Change
siteCreation 8616 ms 8568 ms 48 ms ⚪ 0.0%
siteStartup 4949 ms 4947 ms 2 ms ⚪ 0.0%

Results are median values from multiple test runs.

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

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.

3 participants