diff --git a/src/Symfony/Component/Process/CHANGELOG.md b/src/Symfony/Component/Process/CHANGELOG.md index a9f9173580afe..726a24c61423c 100644 --- a/src/Symfony/Component/Process/CHANGELOG.md +++ b/src/Symfony/Component/Process/CHANGELOG.md @@ -15,6 +15,8 @@ CHANGELOG * support for passing `proc_open()` options has been removed * removed the `ProcessBuilder` class, use the `Process` class instead * removed the `getEnhanceWindowsCompatibility()` and `setEnhanceWindowsCompatibility()` methods of the `Process` class + * passing a not existing working directory to the constructor of the `Symfony\Component\Process\Process` class is not + supported anymore 3.4.0 ----- diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index a9c63e9be11bb..7c5e4a5a338aa 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -297,11 +297,7 @@ public function start(callable $callback = null, array $env = array()) } 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); + throw new RuntimeException('The provided cwd does not exist.'); } $this->process = proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, null, $options); diff --git a/src/Symfony/Component/Process/Tests/ProcessTest.php b/src/Symfony/Component/Process/Tests/ProcessTest.php index 06ab288e6af34..8d490f361a216 100644 --- a/src/Symfony/Component/Process/Tests/ProcessTest.php +++ b/src/Symfony/Component/Process/Tests/ProcessTest.php @@ -47,34 +47,12 @@ protected function tearDown() } } - /** - * @group legacy - * @expectedDeprecation 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. - */ - 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(); - - $cmd = new Process('echo test', __DIR__.'/notfound/'); - $cmd->run(); - } - /** * @expectedException \Symfony\Component\Process\Exception\RuntimeException * @expectedExceptionMessage The provided cwd does not exist. */ - public function testInvalidCwdOnWindows() + public function testInvalidCwd() { - 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__); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy