Skip to content

Launch WP-CLI processes with cheaper PHP settings - #401

Merged
schlessera merged 1 commit into
mainfrom
perf/child-process-php-settings
Nov 2, 2026
Merged

schlessera merged 1 commit into
mainfrom
perf/child-process-php-settings

Conversation

@schlessera

Copy link
Copy Markdown
Member

Addresses #385.

Nearly all of a test run is spent in the wp processes the scenarios launch, and each of them starts PHP from scratch: with Xdebug active when it is installed, and compiling WP-CLI and the package code again although it does not change during a run.

The launched processes now run with Xdebug off, unless code coverage is collected or XDEBUG_MODE, XDEBUG_SESSION or XDEBUG_CONFIG is set, so step debugging keeps working (see #257). WP-CLI and the project under test are kept in a file-based opcode cache. Everything below the temporary directory, where scenarios write their files, stays uncached, and a new scenario checks that a rewritten file is always run in its current version.

WP_CLI_TEST_PHP_TUNING=off restores the previous behavior. Measurements are recorded on #385.

Turn Xdebug off for the processes launched by the tests unless code
coverage is collected or a mode or session is requested explicitly, and
keep the code of WP-CLI and the project under test in a file-based opcode
cache. Files below the temporary directory, where scenarios create and
rewrite their files, are never cached.

WP_CLI_TEST_PHP_TUNING=off launches the processes with the PHP
configuration as it is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: babe5e40-8199-4645-b480-6274aa74261d
Commits

Reviewing files that changed from the base of the PR and between 9298472 and 5915cb0.

Files selected for processing: 2
  • features/behat-steps.feature
  • src/Context/FeatureContext.php
  • 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

@github-actions github-actions Bot added the scope:testing Related to testing label Oct 30, 2026
@codecov

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 29 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/Context/FeatureContext.php 0.00% 29 Missing ⚠️

📢 Thoughts on this report? Let us know!

@schlessera
schlessera marked this pull request as ready for review November 2, 2026 02:22
@schlessera
schlessera requested a review from a team as a code owner November 2, 2026 02:22
@schlessera
schlessera merged commit 1b7b779 into main Nov 2, 2026
71 of 72 checks passed
@schlessera
schlessera deleted the perf/child-process-php-settings branch November 2, 2026 02:22
@schlessera schlessera added this to the 5.4.0 milestone Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant