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
| Comment | File | Size | Author |
|---|
Issue fork drupal-3534156
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:
- 3534156-complete-test-annotations
changes, plain diff MR !12620
Comments
Comment #2
mondrakeComment #4
mondrakeComment #5
mondrakeComment #6
mondrakeComment #7
smustgrave commentedSeems straight forward per the other ones.
Comment #8
mondrakeComment #9
needs-review-queue-bot commentedThe 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.
Comment #10
mondrakererolled
Comment #12
catchCommitted/pushed to 11.x, thanks!