- 🇬🇧United Kingdom catch
Duplicate of 📌 OOP hooks using attributes and event dispatcher Needs review now.
It was decided that Drupal 8 will rely heavily on OOP. While the entity system does this, the only way to interact with is via procedural code. This patch intends to remove the necessity to write procedural code and opens up the possibility to make (much more) of the entity code unit testable. Other problems include a total mixup of storage independent logic with the actual storage, for example calculating the comment thread vs storing the comment thread. There are no interfaces for the storage controllers because it is entirely unclear what the specific storage needs are. The number of hooks available were totally unwieldy as well (quick, does hook_field_load fire before or after hook_field_attach_load? What about hook_field_insert and hook_field_attach_insert? Where does hook_entity_load enter into the picture?).
Hooks are out. Events are in. Storage controllers thin down and get an interface. The logic moves into a StorageSubscriber. Entity hook implementations move into an EntitySubscriber.
The patch is not yet green. It is being worked on in http://drupal.org/sandbox/chx/1857558 entitystorage branch.
No user interface changes.
All entity hooks die -- from hook_entity_load to hook_user_delete, all. Field attach storage hooks die. Field storage callbacks die. Entity events are born.
#1497374: Switch from Field-based storage to Entity-based storage →
#1893772: Move entity-type specific storage logic into entity classes →
Closed: duplicate
11.0 🔥
entity system
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Duplicate of 📌 OOP hooks using attributes and event dispatcher Needs review now.