Problem/Motivation

Using the defaults at #3405392: Setup GitLab CI for Pathologic, we've now got a failing phpstan job in every GitLab CI pipeline. E.g.

https://git.drupalcode.org/project/pathologic/-/jobs/487802

$ php vendor/bin/phpstan analyze $_WEB_ROOT/modules/custom/$CI_PROJECT_NAME $PHPSTAN_CONFIGURATION --no-progress || EXIT_CODE=$?
 ------ ----------------------------------------------------- 
  Line   pathologic.module                                    
 ------ ----------------------------------------------------- 
  273    Cannot unset offset 'qparts' on array{path: mixed}.  
 ------ ----------------------------------------------------- 
 ------ ---------------------------------------------------------------------- 
  Line   src/Plugin/Filter/FilterPathologic.php                                
 ------ ---------------------------------------------------------------------- 
  88     \Drupal calls should be avoided in classes, use dependency injection  
         instead                                                               
 ------ ---------------------------------------------------------------------- 
 [ERROR] Found 2 errors                                                         

Steps to reproduce

Proposed resolution

Since it's only 2 violations, let's fix them instead of defining a baseline.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork pathologic-3408946

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dww created an issue. See original summary.

viren18febS made their first commit to this issue’s fork.

hamid.ali’s picture

Working on this issue

prudloff made their first commit to this issue’s fork.

prudloff’s picture

Status: Active » Needs review

I could not use promoted properties or autowiring without dropping support for older Drupal versions.

  • dww committed 6a891968 on 2.0.x authored by prudloff
    task: #3408946 Fix PHPStan failures: use dependency injection in...

dww’s picture

Title: Fix phpstan failures » Fix PHPStan failures: use dependency injection in FilterPathologic.php
Assigned: dww » Unassigned
Status: Needs review » Fixed

Lovely, thanks! Reviewed, all looks great. Merged to 2.0.x.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • dww committed 435a97c1 on 2.0.x
    ci: #3408946 Follow-up change to .gitlab-ci.yml to force pipeline...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.