Repository navigation
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Document environment variables references/config.md |
Adds WP_CLI_ALLOW_ROOT, WP_CLI_AUTO_CHECK_UPDATE_DAYS, WP_CLI_CACHE_EXPIRY, and WP_CLI_CACHE_MAX_SIZE, with their values, defaults, and cache trimming behavior. |
Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Other
Suggested labels: scope:documentation
Suggested reviewers: swissspidy
Merge Risk: 
Minimal · previous review 4a785
-
The documentation-only change is ready to merge.
Pre-merge checks: 
5
-
Full details: Title check
-
Explanation
The title states that four missing environment variables are documented in the config reference. The changeset adds exactly four entries (WP_CLI_ALLOW_ROOT, WP_CLI_AUTO_CHECK_UPDATE_DAYS, WP_CLI_CACHE_EXPIRY, WP_CLI_CACHE_MAX_SIZE) to references/config.md, so the title matches the main change. It is concise, specific, and free of noise.
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- 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.
WP-CLI 2.12.0 reads WP_CLI_ALLOW_ROOT, WP_CLI_AUTO_CHECK_UPDATE_DAYS, WP_CLI_CACHE_EXPIRY and WP_CLI_CACHE_MAX_SIZE, but the environment variable list in the Config reference does not mention them.
4a78564 to
a2be980
Compare
Summary
Adds four environment variables that WP-CLI 2.12.0 reads but the environment variable list in the Config reference does not mention.
Changes
WP_CLI_ALLOW_ROOT: run as root without adding--allow-rootto every command.WP_CLI_AUTO_CHECK_UPDATE_DAYS: number of days between automatic update checks. Default1.WP_CLI_CACHE_EXPIRY: lifetime of cached files in seconds. Default15552000(180 days).WP_CLI_CACHE_MAX_SIZE: size limit of the file cache in bytes. Default314572800(300 MB).The new entries follow the alphabetical order of the list. Variables that only exist on
mainand are not in a release yet, such asWP_CLI_AUTOCORRECTandWP_CLI_ERROR_RERUN, are left out.In 2.12.0 they are read in
php/WP_CLI/Bootstrap/CheckRoot.php,WP_CLI::get_cache()inphp/class-wp-cli.php, andRunner::auto_check_update()inphp/WP_CLI/Runner.php.Verification
Checked each one against the WP-CLI 2.12.0 Phar:
WP_CLI_ALLOW_ROOT=1:wp cli versionruns when the root check fires. Without it, the "YIKES!" error stops the command. Root was simulated with the sameposix_geteuid()override that the "Test early root detection" scenario infeatures/bootstrap.featureuses.WP_CLI_CACHE_EXPIRY=604800:WP_CLI::get_cache()->clean()removes a 31-day-old cache file and keeps the newer ones.WP_CLI_CACHE_MAX_SIZE=450000: with three 400,000-byte cache files,clean()keeps only the most recently accessed one.WP_CLI_AUTO_CHECK_UPDATE_DAYS=3: when the last check was two days ago, no new check runs. With the default of1, it runs.git diff --check.Use of AI
AI assistance: Yes
Tool(s): Claude Code and Codex
Used for: finding the undocumented variables, testing them against WP-CLI 2.12.0, drafting the change, and reviewing it. I reviewed the reasoning and test results, and I take responsibility for the contribution.
Summary by CodeRabbit