-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add support for reading data from $_SERVER variable #8
Comments
Not quite. We've been using
Yep, this is where env variables actually are, and has always been the correct place to look. |
@ocean90 I've added this option to env v2.1 (not released yet). |
Thanks! Was just going to submit a PR with the same changes. 😃 |
Note that stripping quotes will certainly not be relevant for files loaded by phpdotenv. Quoted strings are processed without their quotes, already. Any quotes that appear would have been intentionally escaped by the user. |
@GrahamCampbell I see, but this library is independent of how the variables are loaded. Some use phpdotenv, others another library or not library at all. Anyway, this is configurable. |
New version released. Thanks guys! |
PHP dotenv v5 has switched to using the
$_SERVER
global as the default storage instead of theputenv()
$_ENV
variable (see v4 fallback chain). See this comment by @GrahamCampbell for the reasoning behind this change.What are you thoughts about adding a new
Env::USE_SERVER_ARRAY
option which reads the data from the$_SERVER
variable?Related: #3.
The text was updated successfully, but these errors were encountered: