Modify PHPUnit related PHPStan error messages to users to help install PHPUnit

Created on 11 March 2024, 4 months ago
Updated 12 March 2024, 4 months ago

Problem/Motivation

For projects that have tests, PHPStan will report a bunch of false positives, where the base classes of the test infrastructure are missing, if Drupal's developer dependencies are not installed.

For projects that do not have tests, Drupal's developer dependencies are not required, and installing them is an extra, unnecessary burden on novice users, who want to upgrade their site from Drupal 9 to Drupal 10.

Steps to reproduce

Want to use Upgrade Status on a site without tests, and be told to install non-essential Drupal developer dependencies.

Proposed resolution

It could be better to catch this kind of error, and add a tip to install Drupal's developer dependencies, directly within the PHPStan error.

We would need some kind of reliable list of errors that show up for these cases first.

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

4.0

Component

Code

Created by

🇩🇰Denmark ressa Copenhagen

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

Comments & Activities

Production build 0.69.0 2024