Skip to content

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

Draft
schlessera wants to merge 1 commit into
mainfrom
perf/child-process-php-settings
Draft

schlessera wants to merge 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

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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

Comment @coderabbitai help to get the list of available commands.

@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!

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