Problem/Motivation

Replace annotation-based test metadata with PHP attributes.

Proposed resolution

1) Complete the conversion done automatically in #3446693: Convert test annotations to attributes in Drupal/Test/Component with the outliers that require manual conversions:

  • core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php
  • core/tests/Drupal/Tests/Component/Annotation/Doctrine/Ticket/DCOM58Test.php
  • core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php
  • core/tests/Drupal/Tests/Component/Datetime/TimeTest.php
  • core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php
  • core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/PhpArrayDumperTest.php

2) Fix the deprecation test at core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php so that it falls back to use PHPUnit discovery to return test information from metadata - since we cover all tests in the unit-component testsuite with this conversion, we no longer have examples of tests in that suite using @group annotation so the legacy discovery via TestDiscovery::getTestInfo() fails in that case.

3) Set PHPUNIT_FAIL_ON_PHPUNIT_DEPRECATION: true for component test jobs in CI so to 'seal' the unit-component testsuite from regressions in using annotation metadata.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3534156

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mondrake created an issue. See original summary.

mondrake’s picture

Issue tags: +PHPUnit 11

mondrake’s picture

Issue summary: View changes
Status: Active » Needs review
mondrake’s picture

Issue summary: View changes
mondrake’s picture

Issue summary: View changes
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems straight forward per the other ones.

needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new91 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. 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.

mondrake’s picture

Status: Needs work » Reviewed & tested by the community

rerolled

  • catch committed 72d0f7f2 on 11.x
    Issue #3534156 by mondrake: Complete test annotations to attributes...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.