Avoid direct drupal calls

Created on 6 October 2024, about 1 month ago

Problem/Motivation

Check this pipeline: https://git.drupalcode.org/project/config_notify/-/jobs/1092646

Proposed resolution

Use Dependency Injected instead of direct drupals calls or use @phpstan-ignore-next-line if it is used on purpose.

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇮🇳India ankitv18

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

Comments & Activities

  • Issue created by @ankitv18
  • 🇪🇸Spain fjgarlin

    All of them except one can be fixed. The one that can't be fixed is:

        if ($this->moduleHandler->moduleExists('slack')) {
          $response = \Drupal::service('slack.slack_service')->sendMessage($message);   // <======== This one can't be fixed because the module might not be enabled at all.
         ...
        }
    
  • @ankitv18 opened merge request.
Production build 0.71.5 2024