Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Dec 9, 2023. It is now read-only.

Commit 007b6a8

Browse filesBrowse files
feature #32475 [Process] Deprecate Process::inheritEnvironmentVariables() (ogizanagi)
This PR was merged into the 4.4 branch. Discussion ---------- [Process] Deprecate Process::inheritEnvironmentVariables() | Q | A | ------------- | --- | Branch? | 4.4 <!-- see below --> | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | N/A <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | N/A IIUC, this method was kept as a BC layer from 3.4 to 4.0 to switch to the "inherit env vars" behavior, inciting developers to opt-in in 3.4. Since 4.0, env vars are always inherited, and this method doesn't allow to opt-out. So, time to remove it? --- refs: - symfony/symfony#21470 - symfony/symfony#22836 Commits ------- af9bad31c6 [Process] Deprecate Process::inheritEnvironmentVariables()
2 parents 3e84c64 + a488b4c commit 007b6a8
Copy full SHA for 007b6a8

File tree

1 file changed

+5
-1
lines changed
Filter options

1 file changed

+5
-1
lines changed

‎WebServer.php

Copy file name to clipboardExpand all lines: WebServer.php
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,11 @@ private function createServerProcess(WebServerConfig $config)
167167

168168
if (\in_array('APP_ENV', explode(',', getenv('SYMFONY_DOTENV_VARS')))) {
169169
$process->setEnv(['APP_ENV' => false]);
170-
$process->inheritEnvironmentVariables();
170+
171+
if (!method_exists(Process::class, 'fromShellCommandline')) {
172+
// Symfony 3.4 does not inherit env vars by default:
173+
$process->inheritEnvironmentVariables();
174+
}
171175
}
172176

173177
return $process;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.