From 6ca1c90eb7344d6fd84db5899bd4261f445c8c95 Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Tue, 17 Jun 2014 01:47:52 +0200 Subject: [PATCH] [FrameworkBundle] Use ProcessHelper for server:run command --- .../FrameworkBundle/Command/ServerRunCommand.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php index f8faaf7658..c132453366 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php @@ -95,16 +95,13 @@ EOF $builder->setTimeout(null); $process = $builder->getProcess(); - if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { - $callback = function ($type, $buffer) use ($output) { - $output->write($buffer); - }; - } else { - $callback = null; + if (OutputInterface::VERBOSITY_VERBOSE > $output->getVerbosity()) { $process->disableOutput(); } - - $process->run($callback); + + $this + ->getHelper('process') + ->run($output, $process, null, null, OutputInterface::VERBOSITY_VERBOSE); } private function createPhpProcessBuilder(InputInterface $input, OutputInterface $output, $env)