[meta] Convert test metadata from annotation to attribites

Created on 12 July 2025, 2 days ago

Problem/Motivation

PHPUnit introduced attributes in place of annotations to define test metadata. Annotations are deprecated. Their support is removed in PHPUnit 12.

In preparation for PHPUnit 12, we have to replace test annotations with attributes. As noticed in #3417066-120: Upgrade PHPUnit to 10, drop Symfony PHPUnit-bridge dependency ,

we can't mix PHPUnit attributes and annotations [in a single file], we will have to convert them all at once unfortunately

with thousands of test classes in Drupal, we should try to automate the conversion, in a way that a script can be executed on a file and convert it end-to-end.

Proposed resolution

Develop a rector rule, and convert all the test classes in child issues.

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

Production build 0.71.5 2024