-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[Console] application/command as text/xml/whatever decoupling #7454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
da67c12
f239b1c
bebf1eb
43b5e5c
acc7414
774794c
2066a9b
47fa194
8b56eb1
27aa872
30d8807
9964838
ef6d8ba
389101a
84be8de
ce5c0fd
49a4612
20c10a5
9c7b358
d3ec073
d70e086
ce60fb7
28f082e
cbb8105
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,6 @@ class HelpCommand extends AbstractDescriptorCommand | |
protected function configure() | ||
{ | ||
parent::configure(); | ||
|
||
$this->ignoreValidationErrors(); | ||
|
||
$this | ||
|
@@ -68,7 +67,6 @@ public function setCommand(Command $command) | |
protected function createDefinition() | ||
{ | ||
$definition = parent::createDefinition(); | ||
|
||
$definition->addArgument(new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help')); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not simply calling |
||
|
||
return $definition; | ||
|
@@ -85,7 +83,7 @@ protected function execute(InputInterface $input, OutputInterface $output) | |
$this->command = $this->getApplication()->find($input->getArgument('command_name')); | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
$this->getHelper('descriptor')->describe($output, $this->command, $input->getArgument('format'), $input->getOption('raw')); | ||
$this->getHelper('descriptor')->describe($output, $this->command, $input->getOption('format'), $input->getOption('raw')); | ||
|
||
$this->command = null; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"commands":[{"name":"help","usage":"help","description":"Displays help for a command","help":"The <info>help<\/info> command displays help for a given command:\n\n <info>php \/usr\/bin\/phpunit help list<\/info>\n\nYou can also output the help as XML by using the <comment>--xml<\/comment> option:\n\n <info>php \/usr\/bin\/phpunit help --xml list<\/info>\n\nTo display the list of available commands, please use the <info>list<\/info> command.","aliases":[],"definition":{"arguments":[],"options":[]}},{"name":"list","usage":"list","description":"Lists commands","help":"The <info>list<\/info> command lists all commands:\n\n <info>php \/usr\/bin\/phpunit list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n <info>php \/usr\/bin\/phpunit list test<\/info>\n\nYou can also output the information as XML by using the <comment>--xml<\/comment> option:\n\n <info>php \/usr\/bin\/phpunit list --xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n <info>php \/usr\/bin\/phpunit list --raw<\/info>","aliases":[],"definition":{"arguments":[],"options":[]}}],"namespaces":[{"id":"_global","commands":["help","list"]}]} | ||
{"commands":[{"name":"help","usage":"help [--format[=\"...\"]] [--raw] [command_name]","description":"Displays help for a command","help":"The <info>help<\/info> command displays help for a given command:\n\n <info>php \/usr\/bin\/phpunit help list<\/info>\n\nYou can also output the help as XML by using the <comment>--xml<\/comment> option:\n\n <info>php \/usr\/bin\/phpunit help --xml list<\/info>\n\nTo display the list of available commands, please use the <info>list<\/info> command.","aliases":[],"definition":{"arguments":{"command_name":{"name":"command_name","is_required":false,"is_array":false,"description":"The command name","default":"help"}},"options":{"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":false,"is_multiple":false,"description":"Output format (json, md)","default":null},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command list","default":false}}}},{"name":"list","usage":"list [--format[=\"...\"]] [--raw] [namespace]","description":"Lists commands","help":"The <info>list<\/info> command lists all commands:\n\n <info>php \/usr\/bin\/phpunit list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n <info>php \/usr\/bin\/phpunit list test<\/info>\n\nYou can also output the information as XML by using the <comment>--xml<\/comment> option:\n\n <info>php \/usr\/bin\/phpunit list --xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n <info>php \/usr\/bin\/phpunit list --raw<\/info>","aliases":[],"definition":{"arguments":{"namespace":{"name":"namespace","is_required":false,"is_array":false,"description":"The namespace name","default":null}},"options":{"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":false,"is_multiple":false,"description":"Output format (json, md)","default":null},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command list","default":false}}}}],"namespaces":[{"id":"_global","commands":["help","list"]}]} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"commands":[{"name":"help","usage":"help","description":"Displays help for a command","help":"The <info>help<\/info> command displays help for a given command:\n\n <info>php \/usr\/bin\/phpunit help list<\/info>\n\nYou can also output the help as XML by using the <comment>--xml<\/comment> option:\n\n <info>php \/usr\/bin\/phpunit help --xml list<\/info>\n\nTo display the list of available commands, please use the <info>list<\/info> command.","aliases":[],"definition":{"arguments":[],"options":[]}},{"name":"list","usage":"list","description":"Lists commands","help":"The <info>list<\/info> command lists all commands:\n\n <info>php \/usr\/bin\/phpunit list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n <info>php \/usr\/bin\/phpunit list test<\/info>\n\nYou can also output the information as XML by using the <comment>--xml<\/comment> option:\n\n <info>php \/usr\/bin\/phpunit list --xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n <info>php \/usr\/bin\/phpunit list --raw<\/info>","aliases":[],"definition":{"arguments":[],"options":[]}},{"name":"descriptor:command1","usage":"descriptor:command1","description":"command 1 description","help":"command 1 help","aliases":["alias1","alias2"],"definition":{"arguments":[],"options":[]}},{"name":"descriptor:command2","usage":"descriptor:command2 [-o|--option_name] argument_name","description":"command 2 description","help":"command 2 help","aliases":[],"definition":{"arguments":{"argument_name":{"name":"argument_name","is_required":true,"is_array":false,"description":"","default":null}},"options":{"option_name":{"name":"--option_name","shortcut":"-o","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"","default":false}}}}],"namespaces":[{"id":"_global","commands":["alias1","alias2","help","list"]},{"id":"descriptor","commands":["descriptor:command1","descriptor:command2"]}]} | ||
{"commands":[{"name":"help","usage":"help [--format[=\"...\"]] [--raw] [command_name]","description":"Displays help for a command","help":"The <info>help<\/info> command displays help for a given command:\n\n <info>php \/usr\/bin\/phpunit help list<\/info>\n\nYou can also output the help as XML by using the <comment>--xml<\/comment> option:\n\n <info>php \/usr\/bin\/phpunit help --xml list<\/info>\n\nTo display the list of available commands, please use the <info>list<\/info> command.","aliases":[],"definition":{"arguments":{"command_name":{"name":"command_name","is_required":false,"is_array":false,"description":"The command name","default":"help"}},"options":{"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":false,"is_multiple":false,"description":"Output format (json, md)","default":null},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command list","default":false}}}},{"name":"list","usage":"list [--format[=\"...\"]] [--raw] [namespace]","description":"Lists commands","help":"The <info>list<\/info> command lists all commands:\n\n <info>php \/usr\/bin\/phpunit list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n <info>php \/usr\/bin\/phpunit list test<\/info>\n\nYou can also output the information as XML by using the <comment>--xml<\/comment> option:\n\n <info>php \/usr\/bin\/phpunit list --xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n <info>php \/usr\/bin\/phpunit list --raw<\/info>","aliases":[],"definition":{"arguments":{"namespace":{"name":"namespace","is_required":false,"is_array":false,"description":"The namespace name","default":null}},"options":{"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":false,"is_multiple":false,"description":"Output format (json, md)","default":null},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command list","default":false}}}},{"name":"descriptor:command1","usage":"descriptor:command1","description":"command 1 description","help":"command 1 help","aliases":["alias1","alias2"],"definition":{"arguments":[],"options":[]}},{"name":"descriptor:command2","usage":"descriptor:command2 [-o|--option_name] argument_name","description":"command 2 description","help":"command 2 help","aliases":[],"definition":{"arguments":{"argument_name":{"name":"argument_name","is_required":true,"is_array":false,"description":"","default":null}},"options":{"option_name":{"name":"--option_name","shortcut":"-o","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"","default":false}}}}],"namespaces":[{"id":"_global","commands":["alias1","alias2","help","list"]},{"id":"descriptor","commands":["descriptor:command1","descriptor:command2"]}]} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,6 @@ | |
|
||
|
||
|
||
list [--xml] [--raw] [namespace] | ||
list [--format[="..."]] [--raw] [namespace] | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does not seem needed