Skip to content

[Console] Fix bug with $output overloading #16621

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

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$output = new SymfonyStyle($input, $output);
$output = new SymfonyStyle($input, $cliOutput = $output);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really care, but this may not be super clear to people reading the code - maybe we can set it in its own line


if (!extension_loaded('pcntl')) {
$output->error(array(
Expand All @@ -85,7 +85,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
if ($output->ask('Do you want to execute <info>server:run</info> immediately? [Yn] ', true)) {
$command = $this->getApplication()->find('server:run');

return $command->run($input, $output);
return $command->run($input, $cliOutput);
}

return 1;
Expand Down