Fix phpstan errors

Created on 3 February 2024, almost 2 years ago

Problem/Motivation

Pipelines are ok cause phpstan pipeline is allowed to fail.
It would be great if its pipeline was also ok though.

Proposed resolution

According to the last CI pipelines, https://git.drupalcode.org/project/migrate_upgrade/-/jobs/528168 we only have to replace Drupal calls by dependency injections.

We also will have to add a phpstan.neon file, cause using dependencies injection will bring errors such as:

Unsafe usage of new static(). 💡 See: https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static

Since it is a best practice in Drupal, we will just ignore that kind of errors

📌 Task
Status

Active

Version

4.0

Component

Code

Created by

🇫🇷France MacSim

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

Merge Requests

Comments & Activities

  • Issue created by @MacSim
  • Merge request !6Draft: Resolve #3419025 "Fix phpstan errors" → (Open) created by MacSim
  • Pipeline finished with Failed
    almost 2 years ago
    Total: 234s
    #87159
  • Pipeline finished with Failed
    almost 2 years ago
    Total: 233s
    #87163
  • Pipeline finished with Failed
    almost 2 years ago
    Total: 233s
    #87168
Production build 0.71.5 2024