[meta] Fix as many PHPStan level 2 issues as possible before bumping the rule level

Created on 20 November 2022, about 2 years ago
Updated 24 August 2023, over 1 year ago

Problem/Motivation

Both when PHPStan analysis was introduced for Drupal, #3178534: Start running PHPStan on Drupal core (level 0) , and when the rule level was upped to 1, #3190406: Update PHPStan to level 1 , we added a baseline of errors that helped us to get the tool in, delegating to follow-ups the clean up of the baseline itself.

In those cases, the baseline consisted of approximately 1k errors.

Now, PHPStan level 2 rule reports (Nov 2022) more than 9k additional errors. Adding these to the baseline would make it hard to manage, so it ws suggested to start addressing PHPStan L2 fixes BEFORE actually bumpling the rule level in PHPStan configuration.

Proposed resolution

Use this meta to report the status of L2 PHPStan errors, open child issues to fix them until a reasonable (tbd) number is reached that could be added to the baseline.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component
Base 

Last updated about 14 hours ago

Created by

🇮🇹Italy mondrake 🇮🇹

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024