Use dependency injection

Created on 21 April 2023, about 1 year ago
Updated 30 June 2023, 12 months ago

Problem/Motivation

Fix warnings reported by PHPCS to use dependency injection.

Steps to reproduce

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig tsi/

Proposed resolution

Use dependency injection to fix warnings.

Remaining tasks

Fix the warnings:

FILE: /var/www/html/contribution/drupal10/web/modules/contrib/tsi/src/Commands/TsiDrushCommands.php
---------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------
31 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
62 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------

๐Ÿ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

๐Ÿ‡ฉ๐Ÿ‡ชGermany onfire84

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

Comments & Activities

Production build 0.69.0 2024