public function executeSimple($commandline, $dir = null, array $env = [])
    {
        $this->stdErr->writeln(
            'Running command: <info>' . $commandline . '</info>',
            OutputInterface::VERBOSITY_VERBOSE
        );

        if (!empty($env)) {
            $this->showEnvMessage($env);
            $env = $env + $this->getParentEnv();
        } else {
            $env = null;
        }

        $this->showWorkingDirMessage($dir);

        $process = proc_open($commandline, [STDIN, STDOUT, STDERR], $pipes, $dir, $env);

        return proc_close($process);
    }
public function executeSimple($commandline, $dir = null, array $env = [])
    {
        $this->stdErr->writeln(
            'Running command: <info>' . $commandline . '</info>',
            OutputInterface::VERBOSITY_VERBOSE
        );

        if (!empty($env)) {
            $this->showEnvMessage($env);
            $env = $env + $this->getParentEnv();
        } else {
            $env = null;
        }

        $this->showWorkingDirMessage($dir);

        $process = proc_open($commandline, [STDIN, STDOUT, STDERR], $pipes, $dir, $env);

        return proc_close($process);
    }
public function executeSimple ( $ commandline , $ dir = null , array $ env = [ ] ) { $ this -> stdErr -> writeln ( 'Running command: <info>' . $ commandline . '</info>' , OutputInterface :: VERBOSITY_VERBOSE ) ; if ( ! empty ( $ env ) ) { $ this -> showEnvMessage ( $ env ) ; $ env = $ env + $ this -> getParentEnv ( ) ; } else { $ env = null ; } $ this -> showWorkingDirMessage ( $ dir ) ; $ process = proc_open ( $ commandline , [ STDIN , STDOUT , STDERR ] , $ pipes , $ dir , $ env ) ; return proc_close ( $ process ) ; }
Execute a command, using STDIN, STDERR and STDOUT directly.

@param string      $commandline
@param string|null $dir
@param array       $env

@return int
The command's exit code (0 on success, a different integer on failure).
Execute a command using STDIN STDERR and STDOUT directly .