bug #25447 [Process] remove false-positive BC breaking exception on Windows (nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[Process] remove false-positive BC breaking exception on Windows

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #25446
| License       | MIT
| Doc PR        | -

Commits
-------

fe41155ea1 [Process] remove false-positive BC breaking exception on Windows
This commit is contained in:
Fabien Potencier 2017-12-11 12:30:22 -08:00
commit f07430f9a9
2 changed files with 0 additions and 30 deletions

View File

@ -331,10 +331,6 @@ class Process implements \IteratorAggregate
}
if (!is_dir($this->cwd)) {
if ('\\' === DIRECTORY_SEPARATOR) {
throw new RuntimeException('The provided cwd does not exist.');
}
@trigger_error('The provided cwd does not exist. Command is currently ran against getcwd(). This behavior is deprecated since version 3.4 and will be removed in 4.0.', E_USER_DEPRECATED);
}

View File

@ -54,10 +54,6 @@ class ProcessTest extends TestCase
*/
public function testInvalidCwd()
{
if ('\\' === DIRECTORY_SEPARATOR) {
$this->markTestSkipped('Windows handles this automatically.');
}
// Check that it works fine if the CWD exists
$cmd = new Process('echo test', __DIR__);
$cmd->run();
@ -66,28 +62,6 @@ class ProcessTest extends TestCase
$cmd->run();
}
/**
* @expectedException \Symfony\Component\Process\Exception\RuntimeException
* @expectedExceptionMessage The provided cwd does not exist.
*/
public function testInvalidCwdOnWindows()
{
if ('\\' !== DIRECTORY_SEPARATOR) {
$this->markTestSkipped('Unix handles this automatically.');
}
try {
// Check that it works fine if the CWD exists
$cmd = new Process('echo test', __DIR__);
$cmd->run();
} catch (\Exception $e) {
$this->fail($e);
}
$cmd = new Process('echo test', __DIR__.'/notfound/');
$cmd->run();
}
public function testThatProcessDoesNotThrowWarningDuringRun()
{
if ('\\' === DIRECTORY_SEPARATOR) {