Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fe41155

Browse filesBrowse files
[Process] remove false-positive BC breaking exception on Windows
1 parent d21aa19 commit fe41155
Copy full SHA for fe41155

File tree

2 files changed

+0
-30
lines changed
Filter options

2 files changed

+0
-30
lines changed

‎src/Symfony/Component/Process/Process.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Process/Process.php
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,10 +331,6 @@ public function start(callable $callback = null/*, array $env = array()*/)
331331
}
332332

333333
if (!is_dir($this->cwd)) {
334-
if ('\\' === DIRECTORY_SEPARATOR) {
335-
throw new RuntimeException('The provided cwd does not exist.');
336-
}
337-
338334
@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);
339335
}
340336

‎src/Symfony/Component/Process/Tests/ProcessTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Process/Tests/ProcessTest.php
-26Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ protected function tearDown()
5454
*/
5555
public function testInvalidCwd()
5656
{
57-
if ('\\' === DIRECTORY_SEPARATOR) {
58-
$this->markTestSkipped('Windows handles this automatically.');
59-
}
60-
6157
// Check that it works fine if the CWD exists
6258
$cmd = new Process('echo test', __DIR__);
6359
$cmd->run();
@@ -66,28 +62,6 @@ public function testInvalidCwd()
6662
$cmd->run();
6763
}
6864

69-
/**
70-
* @expectedException \Symfony\Component\Process\Exception\RuntimeException
71-
* @expectedExceptionMessage The provided cwd does not exist.
72-
*/
73-
public function testInvalidCwdOnWindows()
74-
{
75-
if ('\\' !== DIRECTORY_SEPARATOR) {
76-
$this->markTestSkipped('Unix handles this automatically.');
77-
}
78-
79-
try {
80-
// Check that it works fine if the CWD exists
81-
$cmd = new Process('echo test', __DIR__);
82-
$cmd->run();
83-
} catch (\Exception $e) {
84-
$this->fail($e);
85-
}
86-
87-
$cmd = new Process('echo test', __DIR__.'/notfound/');
88-
$cmd->run();
89-
}
90-
9165
public function testThatProcessDoesNotThrowWarningDuringRun()
9266
{
9367
if ('\\' === DIRECTORY_SEPARATOR) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.