Closed adeharo9 closed 4 years ago
A neat feature would be to provide a dedicated directory for the .env
file as well. This might come handy in big projects stacks.
@felixgeissler it is possible to load any file as a dotenv file regardless of its scope. What I meant is that, during auto-configuration, the env
object tries to load a hypothetical .env
file located at the same level where the executable is located (in case it does not exist, it fails silently), but there is no problem on loading as many .env
files from different locations as needed.
After recent issues with deferred dynamic initialization and static initialization order fiasco caused by auto-configuration (as commented in #14 ), this feature is going to be dropped on the next release, and thus this issue no longer applies.
Only
.env
files at executable level are loaded on auto-configuration. Add it explicitly toREADME.md
so everyone loads their own.env
files correctly.