There are a bunch of core features and contrib module settings that are not recommended to use on production sites.
- Rebuild theme registry on every page.
- Write errors to the log and to the screen.
- Performance settings (optimize CSS, cache settings, etc).
- Permission to see devel info.
- etc
For some of these you will see warnings, but the others are easy to forget.
Now, the idea of hook_production_warnings() is that you can implement a hook to tell Drupal about settings which are not suited for production sites. Drupal can display this warning on the "status reports" page, or whatever you prefer.
Of course, this idea would be redundant if we had configuration profiles for production and development sites. But so far there is no such a feature, and even if it was, some people might choose not to use it, or some contrib modules might not support it.
The hook_production_warnings would be much easier to implement, and would have no nasty side effects.
Comments
Comment #1
donquixote commentedMore examples:
- Ubercart configured with a PayPal sandbox account!
- dev snapshot modules.
Comment #2
jhedstromI think this can probably be done with
hook_requirements()? Feel free to re-open if not.Comment #3
donquixote commentedHow can a hook_requirements() implementation know whether a system is meant for production?