Problem/Motivation

Phpstan is saying, regarding a number of different classes, "Storing entity storage as a class property is not recommended. Call Drupal\Core\Entity\EntityTypeManagerInterface::getStorage() at the call-site instead." It also says "Direct injection of entity storage via $storage is not recommended. Inject Drupal\Core\Entity\EntityTypeManagerInterface and call getStorage() at the call-site instead." about a similarly long list of classes.

Proposed resolution

Evaluate whether the storage is actually being used; if not, remove it; if so, substitute the recommended methods.

Remaining tasks

Make a MR. I am assigning this to myself since I intend to work on it right away.

Issue fork feeds-3614921

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

benstallings created an issue. See original summary.

benstallings’s picture

Assigned: benstallings » Unassigned
Status: Active » Needs review
megachriz’s picture

Status: Needs review » Needs work

This is a good intent, but some of the changes will break backwards compatibility.