Skip to content

docs: WP-CLI subcommand names and dependency injection - #49

Merged
ogorzalka merged 1 commit into
mainfrom
docs/wp-cli-package
Oct 13, 2026
Merged

ogorzalka merged 1 commit into
mainfrom
docs/wp-cli-package

Conversation

@ogorzalka

Copy link
Copy Markdown
Member

Fixes two statements of the WP-CLI page, checked against WP-CLI's CommandFactory and pollora/wp-cli:

  • Subcommand names: WP-CLI registers a public method under its name as written (listUsers), not in kebab case. Only #[Command] with no argument derives list-users. The example and the slug table now say so.
  • Service injection: the example only works from pollora/wp-cli 0.1.1 (Pollora 13.36), where WP-CLI receives the command instance built with its dependencies. Before it, WP-CLI built the class with new $class() (Pollora/wp-cli#1).

To merge with the v13.36 release, like #48.

@ogorzalka
ogorzalka merged commit cdff88b into main Oct 13, 2026
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