src/ProcessUtil/ProcessUtil.php
public function executeCommand(array $arguments, $processBuilderCallback = null)
    {
        $processBuilder = clone $this->processBuilder;
        $processBuilder->setArguments($arguments);

        if (is_callable($processBuilderCallback)) {
            $processBuilderCallback($processBuilder);
        }

        $process = $processBuilder->getProcess();
        $process->run();

        if (!$process->isSuccessful()) {
            if (127 === $process->getExitCode()) {
                throw new ExecutableNotFoundException($process);
            }

            throw new ProcessFailedException($process);
        }

        return $process;
    }
public function executeCommand(array $arguments, $processBuilderCallback = null)
    {
        $processBuilder = clone $this->processBuilder;
        $processBuilder->setArguments($arguments);

        if (is_callable($processBuilderCallback)) {
            $processBuilderCallback($processBuilder);
        }

        $process = $processBuilder->getProcess();
        $process->run();

        if (!$process->isSuccessful()) {
            if (127 === $process->getExitCode()) {
                throw new ExecutableNotFoundException($process);
            }

            throw new ProcessFailedException($process);
        }

        return $process;
    }
public function executeCommand ( array $ arguments , $ processBuilderCallback = null ) { $ processBuilder = clone $ this -> processBuilder ; $ processBuilder -> setArguments ( $ arguments ) ; if ( is_callable ( $ processBuilderCallback ) ) { $ processBuilderCallback ( $ processBuilder ) ; } $ process = $ processBuilder -> getProcess ( ) ; $ process -> run ( ) ; if ( ! $ process -> isSuccessful ( ) ) { if ( 127 === $ process -> getExitCode ( ) ) { throw new ExecutableNotFoundException ( $ process ) ; } throw new ProcessFailedException ( $ process ) ; } return $ process ; }
Executes given command
@param array $arguments
@param null $processBuilderCallback
@return \Symfony\Component\Process\Process
@throws ExecutableNotFoundException
@throws ProcessFailedException
Executes given command