Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas left a comment
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)
Nyholm commentedApr 10, 2019
Thank you for the reviews |
fabpot commentedApr 10, 2019
Thank you@Nyholm. |
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/aFrom discussions onsymfony/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\"
Nyholm commentedApr 10, 2019
Thank you for merging |
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 | noThis PR improves a little bit of some messages from#31062The 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
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
Uh oh!
There was an error while loading.Please reload this page.
From discussions onsymfony/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
putenvin Symfony 5.0. If so, I would also deprecate$usePutenv=true.