DrupalStandardsListenerTrait is broken

Created on 21 January 2023, almost 2 years ago
Updated 28 March 2023, over 1 year ago

Problem/Motivation

DrupalStandardsListenerTrait has been broken since issue #3186443: PHPUnit 9.5 Call to undefined method ::getAnnotations() .

1) the test class passed in for finding the annotations is the listener's itself, not the test one
2) the test method passed in the the test name, which in case of tests with dataproviders includes the dataset name

Proposed ultimate resolution as conceived by @mondrake

Actually, remove DrupalStandardsListenerTrait altogether - phpstan/phpstan-phpunit is better at doing these checks, and helped find out this issue. Therefore, complete 📌 Add phpstan/phpstan-phpunit as a dev dependency Fixed , and once done that, remove DrupalStandardsListenerTrait. That would also help in future efforts to migrate to PHPUnit 10 that drops the usage of listeners.

Proposed resolution for this issue

- Fix DrupalStandardsListenerTrait
- Fix new errors that were not discovered due to DrupalStandardsListenerTrait being broken

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Closed: won't fix

Version

10.1

Component
PHPUnit 

Last updated about 3 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