Allow for arbitrary arguments
Remove the `--args` option and allow for arbitrary arguments.
This commit is contained in:
parent
e499d42fa5
commit
f94736183e
7 changed files with 21 additions and 13 deletions
|
@ -17,12 +17,16 @@ abstract class AbstractCommand extends Command
|
|||
|
||||
protected function configure(): void
|
||||
{
|
||||
$this->addOption(
|
||||
name: 'args',
|
||||
shortcut: 'a',
|
||||
mode: InputArgument::OPTIONAL,
|
||||
description: 'Any additonal arguments to pass to the command.',
|
||||
);
|
||||
// Allow for passing arbitrary arguments to the underlying command, for
|
||||
// example, to run `composer install` with the `--no-dev` option:
|
||||
//
|
||||
// ./bin/console install -- --no-dev
|
||||
//
|
||||
// And to set the port and environment for a Sculpin project, multiple
|
||||
// arguments can be passed at once as a string:
|
||||
//
|
||||
// ./bin/console run -- '-e prod --port 8001'
|
||||
$this->addArgument('*');
|
||||
|
||||
$this->addOption(
|
||||
name: 'language',
|
||||
|
|
Reference in a new issue