Skip to content

Commit bdc3766

Browse files
committed
Remove code for legacy Process component versions
1 parent 7b89fb1 commit bdc3766

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

Dotenv.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -446,12 +446,7 @@ private function resolveCommands(string $value, array $loadedVars): string
446446
throw new \LogicException('Resolving commands requires the Symfony Process component.');
447447
}
448448

449-
$process = method_exists(Process::class, 'fromShellCommandline') ? Process::fromShellCommandline('echo '.$matches[0]) : new Process('echo '.$matches[0]);
450-
451-
if (!method_exists(Process::class, 'fromShellCommandline') && method_exists(Process::class, 'inheritEnvironmentVariables')) {
452-
// Symfony 3.4 does not inherit env vars by default:
453-
$process->inheritEnvironmentVariables();
454-
}
449+
$process = Process::fromShellCommandline('echo '.$matches[0]);
455450

456451
$env = [];
457452
foreach ($this->values as $name => $value) {

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"symfony/process": "^5.4|^6.0"
2424
},
2525
"conflict": {
26-
"symfony/console": "<5.4"
26+
"symfony/console": "<5.4",
27+
"symfony/process": "<5.4"
2728
},
2829
"autoload": {
2930
"psr-4": { "Symfony\\Component\\Dotenv\\": "" },

0 commit comments

Comments
 (0)