\Drupal calls should be avoided in classes, use dependency injection instead (in PluginEventSubscriber.php)

Created on 20 April 2023, almost 2 years ago
Updated 26 April 2023, almost 2 years ago

Problem/Motivation

PHPCS throws three errors relating to dependency injection upon running the command on the module.

Steps to reproduce

Run the phpcs command on the module.

Proposed resolution

We need to inject three core services into the event subscriber class (namely database, entity type manager, and config factory).

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.2

Component

Code

Created by

🇮🇳India sidharth_soman Bangalore

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

Comments & Activities

Production build 0.71.5 2024