Problem/Motivation

Replace annotation-based test metadata with PHP attributes.

Proposed resolution

1) Complete manually the conversion done automatically for Kernel in #3545163: Convert test annotations to attributes in core’s Kernel tests using Rector rule and #3543586: Convert test annotations to attributes in modules' Kernel tests using Rector rule with the remaining outliers.

2) Fix any straggler in any test suite.

3) Set PHPUNIT_FAIL_ON_PHPUNIT_DEPRECATION: true for all test jobs in CI so to 'seal' the testsuites from regressions in using annotation metadata.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3547173

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

Assigned: Unassigned » mondrake
Status: Postponed » Needs work

Last blocker is in, this is workable now. On it.

mondrake’s picture

Assigned: mondrake » Unassigned
Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Since that bulk kernel impacted a number of tickets think it would be good to get this in early while people are still rebasing those MRs.

mondrake’s picture

Issue tags: +Avoid commit conflicts
quietone’s picture

I reviewed the MR and the test file changes looks correct to me. I did note that the three test files for views plugins in sqlite, mysql, and pgsql have the addition of #[Group('views')] when there is not a corresponding '@group views' annotation. I haven't kept up with the gitlab files, so am not commenting on those.

mondrake’s picture

#8 that's a side effect of cleaning up the same annotation from the abstract base class views/tests/src/Kernel/Plugin/CastedIntFieldJoinTestBase: since class-level annotations are noop on abstract classes, I removed that from there, but then added it back to the concrete classes.

  • longwave committed 46c6a198 on 11.x
    Issue #3547173 by mondrake: Complete test annotations to attributes...
longwave’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for keeping up with this - let's land this now to avoid yet another rebase.

Committed 46c6a19 and pushed to 11.x. Thanks!

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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