-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support cases where .env doesn't exist. #8
Comments
yes this sounds like a great new feature. i can add some diagnostic checks in my applications that require the env file. i like the idea. let me know if you have any questions or ideas about the unit tests : ) the existing ModuleTest triggers the ModuleManager, giving coverage over init and bootstrap. it's a collaboration test and pretty high level. up to you if you want to do a low and/or high level test. |
Given I tried using a boolean flag to support both cases, required and non-required .env; but the problem is that flag can't be injected from a config file (because dotenv should be initialized before the config files are merged, so that it can be read). I'm kind of in a dead-end. Edit 1: maybe said flag can be read from |
I'm mostly working on setups where the
.env
file works as a quick environment variable definition helper for development purposes, but on QA/staging/production servers we mostly use the environment variables defined on the system itself.It'd be great to support cases where if the .env doesn't exist, the system doesn't crash, kind of the way Laravel implements it on its bootstrap process.
I'm willing to push a PR if this is OK, let me know 😄
The text was updated successfully, but these errors were encountered: