Fix PHPstan warning \Drupal calls should be avoided in classes

Created on 10 April 2024, 10 months ago
Updated 23 May 2024, 8 months ago

Problem/Motivation

There is one PHPStan warning for this project, so the pipelines end with an amber warning not green pass. As this project is also used as downstream testing for gitlab_templates merge requests, it would help if the pipeline could end green. Then any amber warning would immediately indicate that something it wrong in the MR being tested. Currently, the amber warning always needs double checking to make sure it is just the same phpstan problem.

There is only one warning

------ ---------------------------------------------------------------------- 
  Line   src/Routing/DatasetRouteEnhancer.php                                  
 ------ ---------------------------------------------------------------------- 
  39     \Drupal calls should be avoided in classes, use dependency injection  
         instead                                                               
 ------ ---------------------------------------------------------------------- 
 [ERROR] Found 1 error               

https://git.drupalcode.org/project/decoupled_pages/-/jobs/1291628

Proposed resolution

Either fix the problem or add it to a phpstan.baseline - downloaded from the job and attached

๐Ÿ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom jonathan1055

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