This documentation describes unreleased changes on the main branch.

#[Argument]

Attribute on parameters.

use Saij\WpAppFramework\WpCli\Argument;

Marks a parameter of a #[CliSubcommand] method as positional argument, <name> with the parameter name in kebab-case. A parameter with a default value is optional, a variadic parameter takes all remaining arguments.

Arguments

#[Argument(string $description = '')]
ParameterTypeDefaultDescription
descriptionstring''The description of the argument in the help; empty for none.