Skip to content
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

add diagnostic checks to require or suggest .env file #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abacaphiliac
Copy link
Owner

add diagnostic checks to require .env file and to warn if file does not exist. default diagnostic requires the file, but the application can override to warn. applications can provide custom factories to override the .env filename and path.

@christopher-francisco
Copy link

christopher-francisco commented Oct 30, 2016

I think this is a perfect solution to support both cases, required and non-required .env file. If I'm not mistaken, behavior would be defined in the config/autoload/global.php by selecting SuggestEnvFile factory option for an non-required .env file configuration (correct me if I'm wrong). I'll test it real quick with a clean zf skeleton and let you know 😄

@abacaphiliac
Copy link
Owner Author

we'll still need your suggestion, to optionally load the file if it exists and/or to catch and ignore the exceptions if the file does not exist.

@christopher-francisco
Copy link

Yep. I really like the proxy method solution that you suggested, should we go for that one?

@abacaphiliac
Copy link
Owner Author

@chris-fa yes please

…ot exist. default diagnostic requires the file, but the application can override to warn. applications can provide custom factories to override the .env filename and path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants