Closed (fixed)
Project:
MyREST Metatag
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
11 Feb 2026 at 14:12 UTC
Updated:
11 Feb 2026 at 16:13 UTC
Jump to comment: Most recent
Some classes, such as MyrestMetatagAdminController, currently use static calls to \Drupal::service() or the \Drupal container. This approach is deprecated and hinders testability.
create() method to MyrestMetatagAdminController.EntityTypeManagerInterface and other required services via the constructor.\Drupal usage and refactor them to use DI.Refactor controllers and forms to use proper DI.
None.
Constructors of modified classes will change to support DI.
None.
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
Comment #3
sergeydruua commentedComment #5
sergeydruua commented