Problem/Motivation
drupal_static()
should ideally be obsolete, but there are many procedural places in core that use them.
Other properly injected OO code needs to use drupal_static_reset()
because of that, which leads to include
-hell for tests.
Proposed resolution
Deprecate drupal_static()
and drupal_static_reset()
. Provide no replacement as using static variables is a bad design. Document that new code should not use drupal_static()
.
Remaining tasks
None.
User interface changes
None.
API changes
Both drupal_static()
and drupal_static_reset()
are now deprecated.