Problem/Motivation

If you scan this module with Upgrade Status in Drupal 11, you see multiple warnings of the form, "unsafe usage of new static()." While these were tolerated in Drupal 10, we have better options available now.

Steps to reproduce

Use Upgrade Status to scan this module. Read the identified "problems."

Proposed resolution

Where autowiring is available, use that. Where it is not, use the "$instance = parent::create()" pattern or "new self()" instead of "new static()."

Remaining tasks

Make an MR. I'm assigning this to myself since I intend to work on it right away.

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

bojan_dev’s picture

Status: Needs review » Fixed

Looks good, ty!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.