Skip to content

feat(wp-cli): namespace the pattern-validate command - #191

Merged
jasperf merged 1 commit into
mainfrom
feat/pattern-validate-namespace
Aug 21, 2026
Merged

feat(wp-cli): namespace the pattern-validate command#191
jasperf merged 1 commit into
mainfrom
feat/pattern-validate-namespace

Conversation

@jasperf

@jasperf jasperf commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

pattern-validate.php registered its WP-CLI command under an unprefixed global namespace — wp pattern validate. pattern is generic enough that publishing this command as a standalone WP-CLI package would risk colliding with someone else's command in that namespace.

Changes

  • WP_CLI::add_command() now registers imagewize pattern-validate instead of pattern validate. Renamed ahead of publishing rather than after, since a post-release rename is a breaking change for anyone already using it.
  • Updated every doc that documented the old invocation: README.md, CLAUDE.md, docs/bedrock/README.md, docs/bedrock/wp-cli-config/README.md, docs/category-organization.md.
  • docs/wp-cli-package-evaluation.md updated to mark this step done.
  • CHANGELOG.md entry added.

No Go code changes needed — the catalog parses the registered command name from the PHP file at runtime, so wp-ops/trellis ops invocation is unaffected.

Files

  • wp-cli/content-creation/wp-cli-pattern-validate.php
  • README.md, CLAUDE.md, docs/bedrock/README.md, docs/bedrock/wp-cli-config/README.md, docs/category-organization.md
  • docs/wp-cli-package-evaluation.md
  • CHANGELOG.md

WP_CLI::add_command('pattern validate', ...) claimed an unprefixed
global namespace. 'pattern' is generic enough that publishing this as
a standalone WP-CLI package would risk colliding with someone else's
command.

Renamed to 'imagewize pattern-validate' ahead of publishing rather
than after, since a post-release rename is a breaking change. Updated
every doc that documented the old invocation.

No code path other than the WP_CLI::add_command() string and the
docblock examples changes; the Go catalog parses the registered
command name from the file at runtime, so no catalog.json changes
were needed.
@jasperf
jasperf merged commit cc450d4 into main Aug 21, 2026
1 check passed
@jasperf
jasperf deleted the feat/pattern-validate-namespace branch August 21, 2026 04:10
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