diff --git a/src/Common/ExecTrait.php b/src/Common/ExecTrait.php index 6b380361..9959d304 100644 --- a/src/Common/ExecTrait.php +++ b/src/Common/ExecTrait.php @@ -374,11 +374,6 @@ protected function execute($process, $output_callback = null) } if (isset($this->env)) { - // Symfony 4 will inherit environment variables by default, but until - // then, manually ensure they are inherited. - if (method_exists($this->process, 'inheritEnvironmentVariables')) { - $this->process->inheritEnvironmentVariables(); - } $this->process->setEnv($this->env); } diff --git a/tests/integration/ExecTest.php b/tests/integration/ExecTest.php index ab2791a6..64c616c4 100644 --- a/tests/integration/ExecTest.php +++ b/tests/integration/ExecTest.php @@ -56,13 +56,6 @@ public function testMultipleEnvVars() public function testInheritEnv() { - // Symfony < 3.2.1 does not inherit environment variables, so there's - // nothing to test if the function doesn't exist. - if (!method_exists('Symfony\Component\Process\Process', 'inheritEnvironmentVariables')) { - $this->markTestSkipped( - 'Inheriting of environment variables is not supported.' - ); - } // With no environment variables set, count how many environment // variables are present. $task = $this->taskExec('env | wc -l')->interactive(false);