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

[dotenv] Support array notation #25942

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

Closed
wants to merge 1 commit into from
Closed

[dotenv] Support array notation #25942

wants to merge 1 commit into from

Conversation

sanpii
Copy link
Contributor

@sanpii sanpii commented Jan 27, 2018

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR symfony/symfony-docs#9150

In addition of FOO[bar]=BAR notation, supported by bash, this PR adds support for empty keys. I don’t know if it’s a good idea.

@xabbuh xabbuh added the Dotenv label Jan 27, 2018
@nicolas-grekas
Copy link
Member

The dotenv file is meant as a fallback when real env vars cannot be used.
Because it's a fallback, it should not allow more features than real env vars allow.
Here, defining a real bash env var as an array is not compatible with e.g. populating the $_SERVER array.
For this reason, this PR is out of scope for the component.

Instead, you should maybe use env processors, see https://symfony.com/blog/new-in-symfony-3-4-advanced-environment-variables (3.4 & up) and #25627 (4.1 & up)

@sanpii
Copy link
Contributor Author

sanpii commented Jan 29, 2018

@nicolas-grekas Ok, thank you.

@sanpii sanpii closed this Jan 29, 2018
@nicolas-grekas nicolas-grekas added this to the 4.1 milestone Jan 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.