-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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 |
---|---|---|
|
@@ -30,6 +30,8 @@ class HelpCommand extends AbstractDescriptorCommand | |
*/ | ||
protected function configure() | ||
{ | ||
parent::configure(); | ||
|
||
$this->ignoreValidationErrors(); | ||
|
||
$this | ||
|
@@ -66,6 +68,7 @@ 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; | ||
|
@@ -76,6 +79,8 @@ protected function createDefinition() | |
*/ | ||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
parent::execute($input, $output); | ||
|
||
if (null === $this->command) { | ||
$this->command = $this->getApplication()->find($input->getArgument('command_name')); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,8 @@ class ListCommand extends AbstractDescriptorCommand | |
*/ | ||
protected function configure() | ||
{ | ||
parent::configure(); | ||
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 does not seem needed as you removed the custom parent class |
||
|
||
$this | ||
->setName('list') | ||
->setDescription('Lists commands') | ||
|
@@ -76,6 +78,8 @@ protected function getNativeDefinition() | |
*/ | ||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
parent::execute($input, $output); | ||
|
||
$this->getHelper('descriptor')->describe($output, $this->getApplication(), $input->getArgument('format'), $input->getOption('raw')); | ||
} | ||
} |
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