feat(wp-cli): namespace the pattern-validate command - #191
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pattern-validate.phpregistered its WP-CLI command under an unprefixed global namespace —wp pattern validate.patternis 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 registersimagewize pattern-validateinstead ofpattern validate. Renamed ahead of publishing rather than after, since a post-release rename is a breaking change for anyone already using it.README.md,CLAUDE.md,docs/bedrock/README.md,docs/bedrock/wp-cli-config/README.md,docs/category-organization.md.docs/wp-cli-package-evaluation.mdupdated to mark this step done.CHANGELOG.mdentry added.No Go code changes needed — the catalog parses the registered command name from the PHP file at runtime, so
wp-ops/trellis opsinvocation is unaffected.Files
wp-cli/content-creation/wp-cli-pattern-validate.phpREADME.md,CLAUDE.md,docs/bedrock/README.md,docs/bedrock/wp-cli-config/README.md,docs/category-organization.mddocs/wp-cli-package-evaluation.mdCHANGELOG.md