Skip to content

Register WP-CLI subcommands under their documented hyphenated names - #59

Merged
soham2008xyz merged 1 commit into
mainfrom
fix/wp-cli-subcommand-names
Oct 23, 2026
Merged

soham2008xyz merged 1 commit into
mainfrom
fix/wp-cli-subcommand-names

Conversation

@soham2008xyz

Copy link
Copy Markdown
Collaborator

Pull Request

Description

I found this while testing 4.0.0 by hand in a throwaway WordPress container. readme.txt and README.md document wp rfsd purge-transients, wp rfsd process-queue and wp rfsd queue-info. WP-CLI names a subcommand after its method, though, so the commands only existed as purge_transients etc. The documented forms failed:

Error: 'purge-transients' is not a registered subcommand of 'rfsd'. ... Did you mean 'purge_transients'?

3.x had the same problem (wp fqj …). Each method now has @subcommand <hyphenated-name>, plus @alias <underscore_name> so anything already using the underscore form keeps working.

No version bump: this should go out with the next release after 4.0.0, which is the version under WordPress.org review.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Checklist

  • My code follows the project's code style and conventions
  • I have read the CONTRIBUTING.md file
  • I have tested my changes thoroughly
  • I have added tests where appropriate (if applicable)
  • I have updated documentation where needed
  • All existing tests pass (if applicable)
  • The plugin activates and runs without errors
  • Changes do not introduce security issues

Testing Instructions

  • composer lint: clean
  • composer test: 306 OK
  • composer test:multisite: 318 OK
  • test-cli.php checks each method's @subcommand and @alias tags, and that the readme documents the hyphenated name.
  • In a WordPress 7.1.3 container: wp rfsd purge-transients, wp rfsd purge_transients, wp rfsd process-queue --limit=10 and wp rfsd queue-info all succeed.

🤖 Generated with Claude Code

WP-CLI names subcommands after the method unless @subcommand says
otherwise, so 'wp rfsd purge-transients' (as documented in readme.txt and
README.md) failed with 'not a registered subcommand'. The underscore
names stay available as aliases.

Co-Authored-By: Claude <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T13:39:09.608693Z 1f0fea0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@soham2008xyz
soham2008xyz merged commit aaac4f9 into main Oct 23, 2026
17 checks passed
@soham2008xyz
soham2008xyz deleted the fix/wp-cli-subcommand-names branch October 23, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant