add documentation about not injecting entity storage handlers

Created on 10 February 2021, almost 4 years ago
Updated 11 December 2023, about 1 year ago

See #3162827: Do not instantiate entity storages in constructors of services that do not always need them for background.

Instantiating an entity storage handler is expensive. It should not be injected into other classes; instead, inject the entity type manager and get the storage when needed.

This should be documented where developers are likely to see it:

- the entity storage interface
- the entity storage base class
- EntityTypeManagerInterface::getStorage()

📌 Task
Status

Needs work

Version

11.0 🔥

Component
Documentation 

Last updated 1 day ago

No maintainer
Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024