bug #16621 [Console] Fix bug with $output overloading (WouterJ)
This PR was squashed before being merged into the 2.8 branch (closes #16621).
Discussion
----------
[Console] Fix bug with $output overloading
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony-standard/issues/887, #16622
| License | MIT
| Doc PR | -
This is exactly why variable overloading isn't a great idea :)
Commits
-------
5764a00
[Console] Fix bug with overloading
This commit is contained in:
commit
14f70aeafd
@ -74,7 +74,7 @@ EOF
|
|||||||
*/
|
*/
|
||||||
protected function execute(InputInterface $input, OutputInterface $output)
|
protected function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
$output = new SymfonyStyle($input, $output);
|
$output = new SymfonyStyle($input, $cliOutput = $output);
|
||||||
|
|
||||||
if (!extension_loaded('pcntl')) {
|
if (!extension_loaded('pcntl')) {
|
||||||
$output->error(array(
|
$output->error(array(
|
||||||
@ -85,7 +85,7 @@ EOF
|
|||||||
if ($output->ask('Do you want to execute <info>server:run</info> immediately? [Yn] ', true)) {
|
if ($output->ask('Do you want to execute <info>server:run</info> immediately? [Yn] ', true)) {
|
||||||
$command = $this->getApplication()->find('server:run');
|
$command = $this->getApplication()->find('server:run');
|
||||||
|
|
||||||
return $command->run($input, $output);
|
return $command->run($input, $cliOutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
Reference in New Issue
Block a user