-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat: _
can be used as separators in environment variable names
#5156
feat: _
can be used as separators in environment variable names
#5156
Conversation
database.default.hostname -> database_default_hostname See codeigniter4#4026
Because fixture `.env` was changed.
The code looks good. Could you share your motivation behind this change? Are there other frameworks that use underscores? Or perhaps deployment solutions? Or do you have an underscore fetish? 😉 |
never use SimpleConfig.onedeep_value=baz as |
@MGatner Some environments can't use environment variables with dot. And I saw this tweet:
|
@samsonasik Good question! I added a test case, and it passed. |
c1dfd53
to
b5255ed
Compare
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.
I think this is probably the right direction to solve the problem with dot variables for some environments.
The only thing missing is documentation. We don't want this to become a secret feature, so it needs to be documented in the user guide.
@michalsn Thanks! I added it to the documentation. |
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.
Nice teamwork! This looks ready to me.
Description
You can use both as environment variable name:
database.default.hostname
(now) - looking for it firstdatabase_default_hostname
(new) - if not found, looking for itSee #4026
Checklist: