Skip to content

Repair wp/6.1 branch Actions: Install Xdebug 3.1.6 in wp-env on PHP 7 - #651

Closed
desrosj wants to merge 1 commit into
fix-actions-6.1/replace-db-check-with-healthcheckfrom
fix-actions-6.1/fix-xdebug-pecl-php7
Closed

desrosj wants to merge 1 commit into
fix-actions-6.1/replace-db-check-with-healthcheckfrom
fix-actions-6.1/fix-xdebug-pecl-php7

Conversation

@desrosj

@desrosj desrosj commented Oct 7, 2026

Copy link
Copy Markdown
Owner

What?

When Xdebug is turned on and the environment's PHP version is 7.x, wp-env now installs xdebug-3.1.6 instead of the latest Xdebug release (packages/env/lib/init-config.js). Other PHP versions, and an unset PHP version, still install the latest release.

Why?

pecl install xdebug with no version resolves to the newest Xdebug release, and every release from 3.2.0 onward declares php >= 8.0.0 in its PECL metadata, so on a PHP 7 image the install fails:

pecl/xdebug requires PHP (version >= 8.0.0, version <= 8.5.99), installed version is 7.4.33

3.1.6 is the newest release whose PECL metadata supports PHP 7.2–7.4. This branch only installs Xdebug when it is turned on (wp-env start --xdebug, or an xdebug config), which no CI job does, so this fixes local development on PHP 7 and does not change CI.

How?

Ports the Xdebug part of #50490, which made wp-env install xdebug-3.1.6 on PHP 7 (wp/6.3 and newer have it). The rest of WordPress#50490 (Dockerfile restructuring, PHPUnit defaults, docs) isn't needed. The RUN line matches WordPress#50490's, and installXdebug() now takes the config so it can read the development PHP version, the same one checkXdebugPhpCompatibility() already validates. Adds a packages/env changelog entry.

wp/5.8 fixes the same failure in #345 (row AT), where a Docker build against wordpress:php7.4 confirmed that pecl install xdebug fails and pecl install xdebug-3.1.6 installs cleanly. node --check passes on the edited file.

Use of AI Tools

This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.

🤖 Generated with Claude Code

@desrosj
desrosj added this pull request to stack #621 October 7, 2026 01:28
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

🤖 PR meta 🤖

🏷️ Labels

This pull request needs exactly one label indicating its type, and has 0.

  • Required: any label starting with [Type].
  • Found: none.

Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you.

@desrosj
desrosj removed this pull request from stack #621 October 7, 2026 18:02
@desrosj
desrosj changed the base branch from fix-actions-6.1/disable-apparmor-for-performance-tests to wp/6.1 October 7, 2026 18:03
@desrosj
desrosj force-pushed the fix-actions-6.1/fix-xdebug-pecl-php7 branch from 2ca5ccf to e5b3b0c Compare October 7, 2026 18:04
@desrosj
desrosj changed the base branch from wp/6.1 to fix-actions-6.1/replace-db-check-with-healthcheck October 7, 2026 18:05
@desrosj
desrosj added this pull request to stack #667 October 7, 2026 18:05
@desrosj
desrosj marked this pull request as ready for review October 8, 2026 03:29
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: desrosj <desrosj@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@desrosj

desrosj commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

Moved to WordPress#84261.

@desrosj desrosj closed this Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant