Fix DI issues raised by PHPstan

Created on 23 August 2024, 3 months ago
Updated 24 August 2024, 3 months ago

Problem/Motivation

The PHP Stan job is flagging an issue with DI

 ------ ---------------------------------------------------------------------- 
  Line   src/Controller/HideSubmitController.php                               
 ------ ---------------------------------------------------------------------- 
  54     \Drupal calls should be avoided in classes, use dependency injection  
         instead                                                               
 ------ ---------------------------------------------------------------------- 

Related to this: \Drupal::service('renderer')->render($form)

Steps to reproduce

See https://git.drupalcode.org/issue/hide_submit-3469644/-/jobs/2522041

Proposed resolution

Replace the Drupal call with dependency injection

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom aaron.ferris

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