-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Dotenv] Deprecate useage of "putenv" #31062
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fabpot
requested changes
Apr 10, 2019
nicolas-grekas
approved these changes
Apr 10, 2019
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.
(once comments are fixed)
Thank you for the reviews |
fabpot
approved these changes
Apr 10, 2019
047c3f5
to
8e45fc0
Compare
Thank you @Nyholm. |
fabpot
added a commit
that referenced
this pull request
Apr 10, 2019
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\"
Thank you for merging |
nicolas-grekas
added a commit
that referenced
this pull request
Apr 11, 2019
This PR was merged into the 4.3-dev branch. Discussion ---------- [Dotenv] Improve Dotenv messages | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | no | Fixed tickets | no | License | MIT | Doc PR | no This PR improves a little bit of some messages from #31062 The first, passive sentences may be more suitable here because the value couldn't change by itself. It is changed by us - human. The second, if we use **The default value of $usePutenv" argument of "%s\'s constructor**, we have to pass `__CLASS__` as the second parameter of `sprintf` function instead of `__METHOD__`. So, I suggest using **The default value of $usePutenv" argument of "%s"**. Finally, the deprecation warning of `Dotenv::__construct()` is very long. Let's separate it into 2 pieces for readable reason. Commits ------- e871a6a Improve Dotenv messages
fabpot
added a commit
that referenced
this pull request
May 7, 2019
This PR was merged into the 4.3-dev branch. Discussion ---------- [Dotenv] Test do not use putenv | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | The related pull request is #31062. If the `$usePutenv` flag is set to `false`, `putenv` won't be executed. I just add a small test for this situation. Commits ------- 6d1a76e Test do not use putenv
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
.