-
Notifications
You must be signed in to change notification settings - Fork 824
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
introduces SS_EXTRA_DOT_ENVS var for declaring additonal variables #7001
introduces SS_EXTRA_DOT_ENVS var for declaring additonal variables #7001
Conversation
3c9219f
to
8305f08
Compare
I’m a bit confused, what’s the use case for this? Edit: sorry, just saw:
Shouldn’t that be handled at an environment level, or by loading them manually in |
We are currently using conditionals in our This seeks to replicate the existing feature for an SS4 site. I'm sure there are other use cases as well. |
I see, could the logic in this PR not be put in Part of the reason for switching to |
I have made a module version of this already - so that is possible; however, it means enforcing this module's inclusion for all of the sites on our hosting. |
My views on this are as follows:
I think this change means we slip towards encouraging bad practice and idiosyncrasies (which we are trying to move away from), it feels unnecessary and adds yet more to the boot process that serves a very slim usecase over the benefits of everyone else. We can't hope to cover every usecase, for that there are modules.
This feels reasonable to me - are there not modules that are already a requirement to be on the hosting? Alternatively you could look at generating environment variables using some automated process that would write them to a unified |
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.
see #7001 (comment)
No my view is that it's not.
Not having PHP includes was the intention, to eliminate script execution risk.
Agree with this.
I also argued this point earlier, but this is a limitation we want the platform to enforce on the usercode, rather than something usercode opts in to. That being said, I could go either way. :P |
Not having overload largely defeats the purpose of this I think, so if that is a deal-breaker then we may as well close it. Thanks for a reasoned discussion team! |
Sorry, I think you may need to put it into your own module at this point. =( Or otherwise come up with some other |
This will allow the user to declare SS_EXTRA_DOT_ENVS in their primary
.env
file in order to include other ENV-setting files in their BASE_PATH and above.Syntax:
SS_EXTRA_DOT_ENVS='.env2, .env3'
These will be exploded on "," and looped over. They will be called with overload, meaning any vars set in .env will be over-written, and this will proceed all the way down the chain.
This allows us to include temporary or conditional env vars as necessary.