ProcessHelper::mustRun()

Process mustRun(OutputInterface $output, string|Process $cmd, string|null $error = null, callable $callback = null)

Runs the process.

This is identical to run() except that an exception is thrown if the process exits with a non-zero exit code.

Parameters

OutputInterface $output An OutputInterface instance
string|Process $cmd An instance of Process or a command to run
string|null $error An error message that must be displayed if something went wrong
callable $callback A PHP callback to run whenever there is some output available on STDOUT or STDERR

Return Value

Process The process that ran

Exceptions

ProcessFailedException

See also

run()
doc_Symfony
2016-10-28 06:27:08
Comments
Leave a Comment

Please login to continue.