garden-cli
garden-cli copied to clipboard
Add control of required fields when using setters in CliApplication.php
Use
$this->addCommandClass(\App\Command\Something::class, 'run', [self::OPT_REQUIRED => ['id', 'name']]);
if only some fields are required or
$this->addCommandClass(\App\Command\Something::class, 'run', [self::OPT_REQUIRED_ALL => true]);
if all of them are required for given command.
Defaults are [] and false to ensure compatibility with current version.
fixes https://github.com/vanilla/garden-cli/issues/47
@tburry