Closed foxycode closed 7 years ago
Hi, thanks for sending PR!
Could you please fix coding standard - https://travis-ci.org/nette/bootstrap/jobs/194070357#L249? Thank you
Sorry, fixed. Also created constant for variable name.
Thank you.
I don't think this should be internal part of Nette.
It is easy to implement in an application:
if (getenv('MY_APP_DEBUG')) {
$configurator->setDebugMode(TRUE);
}
The debug mode can expose sensitive information, any automatic enabling must be careful.
The environment variables are a little bit magic. No one knows where it came from. "Has it been set by HTTP server? Or has it been set before by OS?". The same for CLI. It is very hard to find who set it. It is global state.
I agree with @milo that widen cases for automatic debug mode is dangerous.
I am using ENV variable to enable debug mode. It have many advantages: https://pehapkari.cz/blog/2017/01/23/inteligentni-debug-mode-v-nette/
It would be nice to have this feature directly in Nette.