Convert test annotations to attributes in modules' Functional tests

Created on 7 July 2025, about 2 months ago

Problem/Motivation

Replace annotation-based test metadata with PHP attributes.

Please DO NOT change the MR here manually. The patch is automatically generated by the MR at 📌 [meta] Define a Rector rule to convert test annotations to attributes Active .

Proposed resolution

In this issue, convert modules' Functional tests, with the exception of:

  • tbd

that requires manual conversion in a follow up.

Remaining tasks

User interface changes

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

Merge Requests

Comments & Activities

  • Issue created by @mondrake
  • Merge request !12652Closes #3534515 → (Open) created by mondrake
  • Pipeline finished with Success
    about 2 months ago
    Total: 479s
    #541173
  • The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • 🇺🇸United States smustgrave

    Appears to need a rebase

    If you are another contributor eager to jump in, please allow the previous poster(s) at least 48 hours to respond to feedback first, so they have the opportunity to finish what they started!

  • 🇮🇹Italy mondrake 🇮🇹

    This touches 1,304 files, so it could become stale easily. I would encourage at reviewing as is also if not mergeable (at the end of the day this is again and again the same conversion pattern repeating), and then re-run the patch generation last minute before commit, if necessary. Otherwise we spend time running the same steps again with no value.

  • Pipeline finished with Success
    about 2 months ago
    #543110
  • 🇺🇸United States nicxvan

    The way one managed these bulk conversions is outline the explicit steps taken so that someone can repeat them.

    I convert them to added script and post them to agitlab snippet.

    I clearly call out that it should be reviewed as a bulk conversion even if there are conflicts but that it should not be rtbc unless there are no conflicts just a comment with process review.

    Then a couple of times a week I run the ddev script in a new branch on the issue.

    You can see the most recent here: 📌 Bulk convert the remaining hooks to OOP Active

  • 🇺🇸United States dcam

    It took me a few hours, maybe more, but I read through the whole raw diff of over 1300 changes. As you'd expect the most common change is the switch to the

    Group

    attribute. I did my best to check every class addition, cover statement, and provider reference. It all looked correct to me.

    There were some other PHPCS changes too, mainly alphabetizing use statements, periods at the end of sentences, and extra line break removals. I'm assuming these were either necessary or impossible to filter out. The good news is that the diff is clean otherwise. There were no other totally unrelated changes.

    It needs to be rebased again. I can review the update commit when it's ready later. But for now I'm going to mark this as RTBC.

  • 🇺🇸United States dcam

    Actually, maybe I should set it to NW instead for the rebase.

Production build 0.71.5 2024