Skip to content

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