Argument definitions are keyed by position and have no name, so validateDefinitions() puts the raw index into the message (src/Command.php:359):
protected array $argumentDefinitions = [
0 => ["type" => "string", "required" => true],
];
php app deploy
# argument "0" is required.
The user has no way to know what argument 0 is meant to be, and the generated help does not print the definitions either (#49), so there is nowhere to look it up.
Suggested fix: let a definition carry a name (and ideally a description), fall back to the position when it is absent, and use the name in the message:
argument "environment" is required.
The same name then feeds the Usage: and Arguments: blocks in #49, so a command declares each input once instead of describing it in $usage by hand.
Argument definitions are keyed by position and have no name, so
validateDefinitions()puts the raw index into the message (src/Command.php:359):php app deploy # argument "0" is required.The user has no way to know what argument 0 is meant to be, and the generated help does not print the definitions either (#49), so there is nowhere to look it up.
Suggested fix: let a definition carry a
name(and ideally adescription), fall back to the position when it is absent, and use the name in the message:The same name then feeds the
Usage:andArguments:blocks in #49, so a command declares each input once instead of describing it in$usageby hand.