Problem/Motivation
The kernel test declares its group with the #[Group] PHP attribute only. That works on Drupal 11 and Drupal 12, which run PHPUnit 10 or newer, but not on Drupal 10, which runs PHPUnit 9. PHPUnit 9 does not read attributes at all: the class PHPUnit\Framework\Attributes\Group does not even exist in it, so the attribute is inert and the test belongs to no group.
The practical effect is that the test cannot be selected by group on the oldest core version the module claims to support. Anyone running the suite the usual way, filtering by the module group, gets nothing back and may reasonably conclude the module ships no tests.
Steps to reproduce
1. Check out the module on a Drupal 10 site, which runs PHPUnit 9.
2. Run the test suite filtered by group: phpunit --group paragraphs_condition
3. PHPUnit reports "No tests executed!".
4. Run the same suite by path instead and the 11 tests run and pass, which shows the tests are fine and only the group declaration is not being read.
Proposed resolution
Keep the #[Group] attribute and add the equivalent @group annotation to the class doc comment. PHPUnit 9 reads the annotation and ignores the attribute, PHPUnit 12 reads the attribute and ignores the annotation, so the test is discoverable by group on every core version the module supports.
Add a comment next to it explaining why both are present, and stating that the annotation should be removed when Drupal 10 support is dropped, so a future maintainer does not delete the wrong one.
Note that #[CoversClass] has the same limitation on PHPUnit 9, but it only affects code coverage attribution rather than whether the tests can be found and run, so it is left alone here.
Comments
Comment #3
trebormc