symfony/symfony — pull request #6421 by seiffert (2012-12-19 13:40:46+00:00)
Title: [Process] Reusability of ProcessBuilder

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo:
License of the code: MIT
Documentation PR:

This PR introduces a new method in the `ProcessBuilder` class: `startNewProcess`. It resets the builder's internal state.
Using this method, one can reuse a `ProcessBuilder` and create multiple processes with it. This way, a client class can have the process builder injected via DI and use it for all processes it creates. Also, this injected process builder can be replaced with a mock for unit tests.