diff --git a/CHANGELOG.md b/CHANGELOG.md index 541d80ee0..849a92175 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Yii2 Queue Extension Change Log - Enh #516: Ensure Redis driver messages are consumed at least once (soul11201) - Bug #522: Fix SQS driver type error with custom value passed to `queue/listen` (flaviovs) - Bug #528: Prevent multiple execution of aborted jobs (luke-) +- Enh #493: Pass environment variables to sub-processes (mgrechanik) 2.3.7 April 29, 2024 -------------------- diff --git a/src/cli/Command.php b/src/cli/Command.php index 5a8758e4d..da9363e9a 100644 --- a/src/cli/Command.php +++ b/src/cli/Command.php @@ -181,8 +181,8 @@ protected function handleMessage($id, $message, $ttr, $attempt) if (!in_array('color', $this->getPassedOptions(), true)) { $cmd[] = '--color=' . $this->isColorEnabled(); } - - $process = new Process($cmd, null, null, $message, $ttr); + $env = isset($_ENV) ? $_ENV : null; + $process = new Process($cmd, null, $env, $message, $ttr); try { $result = $process->run(function ($type, $buffer) { if ($type === Process::ERR) {