Skip to content

Commit 351d273

Browse files
committed
[Process] Deprecate Process::inheritEnvironmentVariables()
1 parent 3309f27 commit 351d273

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Dotenv.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,12 @@ private function resolveCommands($value)
402402
}
403403

404404
$process = method_exists(Process::class, 'fromShellCommandline') ? Process::fromShellCommandline('echo '.$matches[0]) : new Process('echo '.$matches[0]);
405-
$process->inheritEnvironmentVariables(true);
405+
406+
if (!method_exists(Process::class, 'fromShellCommandline')) {
407+
// Symfony 3.4 does not inherit env vars by default:
408+
$process->inheritEnvironmentVariables();
409+
}
410+
406411
$process->setEnv($this->values);
407412
try {
408413
$process->mustRun();

0 commit comments

Comments
 (0)