- Issue created by @mondrake
- Status changed to Postponed
12 months ago 8:12am 31 January 2024 - ๐ฎ๐นItaly mondrake ๐ฎ๐น
Better do this once ๐ Convert use of TestCase::getName to forward compatible TestCase::name Needs work is in, that revives the PhpUnitCompatibilityTrait.
- Merge request !6409Move Test::parseTestMethodAnnotations calls to a trait for later replacement โ (Closed) created by mondrake
- Status changed to Active
11 months ago 1:00pm 14 February 2024 - Status changed to Needs review
11 months ago 4:29pm 14 February 2024 - Status changed to RTBC
11 months ago 3:19pm 15 February 2024 - ๐บ๐ธUnited States smustgrave
Searched for parseTestMethodAnnotations and found TestRequirementsTrait but that appears to be testing the deprecation of parseTestMethodAnnotations.
Other instance is replaced here.
LGTM
- ๐ณ๐ฑNetherlands spokje
Pondered about this being nowadays a "misuse" of the
@covers
-tag (although currently nifty and when implemented probably The-Only-Way) and if this should have a follow-up to make this into a whole new annotation.I'm unsure, maybe core committers have an idea about this?
No matter what, this has to get in asap to get use closer to the PHPUnit 10 hurdle.
- ๐ฌ๐งUnited Kingdom longwave UK
I think we can defer that decision until the PHPUnit 10 upgrade. It seems a relatively neat way of doing it, we need metadata about which class we are testing and conveniently we can borrow that from PHPUnit already. As long as the PHPUnit 10 metadata method handles both attributes and annotations then I don't see an issue, and we should be able to upgrade to PHPUnit 10 first and then migrate test annotations to attributes separately if we need to.
Committed 0e38c5f and pushed to 11.x. Thanks!
- Status changed to Fixed
11 months ago 4:24pm 17 February 2024 -
longwave โ
committed 0e38c5f4 on 11.x
Issue #3355795 by mondrake, smustgrave, Spokje: Test::...
-
longwave โ
committed 0e38c5f4 on 11.x
- ๐ฎ๐นItaly mondrake ๐ฎ๐น
This https://git.drupalcode.org/project/drupal/-/blob/6ba264f34cc45511333ef47... is how the trait will change to support PHPUnit 10.
As long as the PHPUnit 10 metadata method handles both attributes and annotations then I don't see an issue, and we should be able to upgrade to PHPUnit 10 first and then migrate test annotations to attributes separately if we need to.
PHPUnit 10 will support both. PHPUnit 11 will deprecate annotations. PHPUnit 12 will remove them. We potentially need to convert annotations to attributes before Drupal 11 if we want to target PHPUnit 11 for it AND we do not want deprecation notices.
Automatically closed - issue fixed for 2 weeks with no activity.