Download & Extend

Convert all statics to Object Properties

Project:Drupal core
Version:8.x-dev
Component:base system
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Issue tags:Dependency Injection (DI), MN code sprint

Issue Summary

from comment #19 of #1567428: Active trail tests, in order to handle static variables in Drupal 8 we should convert every use of statics to instead by properties of proper objects. The result of this effort will be that we properly register objects into the Dependency Injection Container and perhaps do away with drupal_static() and drupal_static_reset().

Comments

#1

Issue tags:+MN code sprint

#2

This isn't a task unto itself per se, I think, but rather a side-effect of other work. Eg, the menu system needs to be turned into a proper set of objects (after routing it ripped out), and the statics eliminated as part of that. Simply creating objects somewhere that hold statics instead of them being inside functions buys us nothing.