Skip to content

Extends documentation about commands' phpdoc possibilities/limitations #580

Closed

Description

@drzraf

Describe your use case and the problem you are facing

Commands cookbook is lacking some edge-cases about commands' options and I didn't find my answer in any other place either.

Describe the solution you'd like

I'd like to find answers to the following topics regarding phpdoc definition of a command:

  1. Handling short option. Why aren't they supported? Is there known workarounds?
  2. Handling options expecting a comma-separated list of values (like in --foo=bar,baz). It's another common case and I failed to find any example. It's sad options couldn't be used and one can't know if some utils already exist within wp-cli to handle them.
  3. Multiple occurrences of the same option (like in --regex=ab --regex=cd) is another case where documentation is lacking.

Activity

  1. transferred this issue fromwp-cli/wp-clion Oct 30, 2025
  2. swissspidy commented on Jan 22, 2026

    @swissspidy
    Member

    Short options will be supported by wp-cli/wp-cli#6176 if we decide to add it.

    2 and 3 are covered by wp-cli/wp-cli#6198

    wp-cli/wp-cli#6145 is another good addition for the documentation

    wp-cli/wp-cli#6174 too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions