Prevent additional @legacy-covers annotation from being added to test methods

Created on 3 November 2025, 12 days ago
Updated 14 November 2025, 1 day ago

Problem/Motivation

In converting PHPUnit test metadata annotations from annotation to attributes, we renamed most of the @covers annotations to @legacy-covers, since @covers has not a direct equivalent in attributes.

Also, cover attributes are no longer supported on the test methods, only as class targets.

This is leaving a significant amount of cruft @legacy-covers annotation in the codebase, and more so there are new additions that do not make sense as they will unlikely be changed to something meaningful, at least in bulk.

Proposed resolution

Add @legacy-covers to the list of forbidden annotations on test methods, baseline existing instances, let the future fix the history.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

phpunit

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.

No activities found.

Production build 0.71.5 2024