Skip to content

Provide plugin and theme directories as built-in variables - #397

Open
schlessera wants to merge 2 commits into
mainfrom
builtin-directory-variables
Open

schlessera wants to merge 2 commits into
mainfrom
builtin-directory-variables

Conversation

@schlessera

@schlessera schlessera commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Scenarios often run wp plugin path or wp theme path only to save the plugins or themes directory into a variable. Installing WordPress now sets {PLUGIN_DIR} and {THEME_DIR} directly, matching the output of those commands, including for Composer-based installations and a custom wp-content directory.

Fixes #381.

Measurements

Each draft pull request below points wp-cli/wp-cli-tests at this branch. Its Testing workflow ran through workflow_dispatch, together with the same workflow on an unchanged copy of the default branch, three times each where possible. Times are the Run Behat step summed over the matrix jobs that ran in every measured run (median over runs, in job minutes). Retried jobs passed only because behat-rerun repeated their failed scenarios.

Repository Jobs Runs Before (min) After (min) Change Median per job Failed jobs Retried jobs
wp-cli/extension-command#564 51 3/3 886.0 925.7 +4.5% +4.2% 1 → 3 5 → 7
wp-cli/language-command#191 50 3/3 186.4 185.9 -0.2% +3.3% 0 → 0 0 → 0
wp-cli/scaffold-command#402 51 3/3 178.5 161.8 -9.4% -7.8% 3 → 3 22 → 17
Total 1250.9 1273.4 +1.8%

Failing scenarios

Scenarios that failed at least once in a measured run, including runs where behat-rerun then passed them.

  • wp-cli/extension-command: failing with and without the change: features/plugin.feature (List plugins) (3/3 runs), features/theme.feature (Doing wp theme list does a force check by default, deleting any existing transient values) (1/3 runs)
  • wp-cli/scaffold-command: failing with and without the change: features/scaffold.feature (Scaffold starter code for a WooCommerce theme) (2/3 runs), features/scaffold.feature (Scaffold starter code for a theme and activate it) (1/3 runs), features/scaffold.feature (Scaffold starter code for a theme and network enable it) (3/3 runs), features/scaffold.feature (Scaffold starter code for a theme with sass) (2/3 runs), features/scaffold.feature (Scaffold starter code for a theme) (3/3 runs)

@schlessera schlessera added the scope:testing Related to testing label Oct 30, 2026
@schlessera
schlessera requested a review from a team as a code owner October 30, 2026 18:43
@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 51 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: 99324784-a915-412c-b07d-d84e0d517339
Commits

Reviewing files that changed from the base of the PR and between b533a56 and c809aaf.

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

@codecov

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

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

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

📢 Thoughts on this report? Let us know!

schlessera and others added 2 commits October 31, 2026 04:11
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera
schlessera force-pushed the builtin-directory-variables branch from 2be23d2 to c809aaf Compare October 31, 2026 03:11
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.

Provide plugin and theme directories as built-in variables

1 participant