merged branch alias-mac/ticket_5897 (PR #5907)

This PR was merged into the master branch.

Commits
-------

73bb47b [Console] Fix #5897 - Console component require Shell component

Discussion
----------

[Console] Fix #5897 - Console component require Shell component

When setting the process isolation of a shell to true:
`setProcessIsolation(true)` throw a `\RuntimeException` if the Process component isn't available.

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

---------------------------------------------------------------------------

by alias-mac at 2012-11-04T17:07:59Z

I noticed that there is no Unit Testing for the Shell class. Shall I create one with the test for this fix/bug request?

---------------------------------------------------------------------------

by alias-mac at 2012-11-06T01:58:40Z

Updated based on @stof comments.

---------------------------------------------------------------------------

by alias-mac at 2012-11-06T02:11:20Z

The travis-ci build failure as nothing to do with the code. See:
https://travis-ci.org/#!/symfony/symfony/jobs/3076345
This commit is contained in:
Fabien Potencier 2012-11-06 09:19:04 +01:00
commit e67893984c

View File

@ -203,5 +203,9 @@ EOF;
public function setProcessIsolation($processIsolation)
{
$this->processIsolation = (Boolean) $processIsolation;
if ($this->processIsolation && !class_exists('Symfony\\Component\\Process\\Process')) {
throw new \RuntimeException('Unable to isolate processes as the Symfony Process Component is not installed.');
}
}
}