\Drupal calls should be avoided in classes

Created on 25 April 2024, 7 months ago
Updated 21 May 2024, 7 months ago

Problem/Motivation

From https://git.drupalcode.org/project/webform_eloqua/-/jobs/1423413

$ php vendor/bin/phpstan analyze $_WEB_ROOT/modules/custom/$CI_PROJECT_NAME $PHPSTAN_CONFIGURATION --no-progress || EXIT_CODE=$?
 ------ ---------------------------------------------------------------------- 
  Line   src/Plugin/WebformHandler/WebformEloquaHandler.php                    
 ------ ---------------------------------------------------------------------- 
  291    \Drupal calls should be avoided in classes, use dependency injection  
         instead                                                               
  387    \Drupal calls should be avoided in classes, use dependency injection  
         instead                                                               
 ------ ---------------------------------------------------------------------- 
 [ERROR] Found 2 errors  

Steps to reproduce

Run Gitlab CI

Proposed resolution

Use dependency injection

Remaining tasks

  1. Update the code
  2. Test manually

User interface changes

None

API changes

None

Data model changes

None

πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States papagrande US West Coast

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024