diff --git a/src/Symfony/Component/Process/CHANGELOG.md b/src/Symfony/Component/Process/CHANGELOG.md index 09109e8d78..eca3141fe2 100644 --- a/src/Symfony/Component/Process/CHANGELOG.md +++ b/src/Symfony/Component/Process/CHANGELOG.md @@ -4,6 +4,7 @@ CHANGELOG 5.0.0 ----- + * removed `Process::inheritEnvironmentVariables()` * removed `PhpProcess::setPhpBinary()` * `Process` must be instantiated with a command array, use `Process::fromShellCommandline()` when the command should be parsed by the shell * removed `Process::setCommandLine()` diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index 7a32b2ad8c..c3d5753e1c 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -1176,24 +1176,6 @@ class Process implements \IteratorAggregate return $this; } - /** - * Sets whether environment variables will be inherited or not. - * - * @return self The current Process instance - * - * @deprecated since Symfony 4.4, env variables are always inherited - */ - public function inheritEnvironmentVariables(bool $inheritEnv = true) - { - @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.4, env variables are always inherited.', __METHOD__), E_USER_DEPRECATED); - - if (!$inheritEnv) { - throw new InvalidArgumentException('Not inheriting environment variables is not supported.'); - } - - return $this; - } - /** * Performs a check between the timeout definition and the time the process started. *