-
-
Notifications
You must be signed in to change notification settings - Fork 496
Populate $_SERVER with $_ENV #571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request passes validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
While you are right about thread safety this again introduces the problem that a system behaves different after calling The better solution would be to remove putenv from Dotenv, too. But that's not how it currently is. |
I agree with that but indeed it would be quite a BC break. |
Yep, unfortunately it is in the Symfony doc prior to 4.2, so it might be out in the wild. |
This PR was squashed before being merged into the 4.3-dev branch (closes #31062). Discussion ---------- [Dotenv] Deprecate useage of "putenv" | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | n/a From discussions on symfony/recipes#571, I think it is a good idea to make people opt-in to using `putenv`. In Symfony 5.0 we will just change the value of the constructor. As an alternative, we could decide we want to remove `putenv` in Symfony 5.0. If so, I would also deprecate `$usePutenv=true`. Commits ------- 8e45fc0 [Dotenv] Deprecate useage of \"putenv\"
Reverts #540, fixes #532 (comment)