symfony/symfony — pull request #8655 by schmittjoh (2013-08-03 07:30:39+00:00)
Title: Adds PTY mode & convenience method mustRun()

This makes two additions. I've split them into separate commits so that you can pull them separately if required.

1. Adds PTY mode.
In contrast to the existing TTY mode, the proc_open call becomes the master not the process currently executing.

2. Adds a ``mustRun`` method
This is merely for convenience:

```php
# Before
$proc = new Process($cmd);
if (0 !== $proc->run()) {
throw new ProcessFailedException($proc);
}

$proc = new Process($cmd);
if (0 !== $proc->run()) {
throw new ProcessFailedException($proc);
}

# After
(new Process($cmd))->mustRun();
(new Process($cmd))->mustRun();