8000 bug #39083 [Dotenv] Check if method inheritEnvironmentVariables exist… · symfony/symfony@3eec466 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3eec466

Browse files
committed
bug #39083 [Dotenv] Check if method inheritEnvironmentVariables exists (Chi-teck)
This PR was merged into the 4.4 branch. Discussion ---------- [Dotenv] Check if method inheritEnvironmentVariables exists | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #38201 | License | MIT | Doc PR | - Commits ------- bd72a56 Check if method inheritEnvironmentVariables exists
2 parents 728574d + bd72a56 commit 3eec466

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Dotenv/Dotenv.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ private function resolveCommands(string $value, array $loadedVars): string
401401

402402
$process = method_exists(Process::class, 'fromShellCommandline') ? Process::fromShellCommandline('echo '.$matches[0]) : new Process('echo '.$matches[0]);
403403

404-
if (!method_exists(Process::class, 'fromShellCommandline')) {
404+
if (!method_exists(Process::class, 'fromShellCommandline') && method_exists(Process::class, 'inheritEnvironmentVariables')) {
405405
// Symfony 3.4 does not inherit env vars by default:
406406
$process->inheritEnvironmentVariables();
407407
}

0 commit comments

Comments
 (0)
0