Closed (fixed)
Project:
Drupal core
Version:
11.3.x-dev
Component:
base system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Nov 2025 at 23:20 UTC
Updated:
12 Dec 2025 at 09:04 UTC
Jump to comment: Most recent
Comments
Comment #2
alexpottComment #4
alexpottComment #5
mondrakeGood catch.
Few comments:
1) this is now partially overlapping with #3548982: Enforce removal of PHPUnit annotations from test classes' class metadata, in the sense that it analyses same scope with slightly different checks. May be better try to have one rule only?
2) the check on #[Group] attribute presence here is limited to Functional and Kernel tests AFAICS - should be on any test class actually
Comment #6
mondrakeComment #7
alexpottYep let's merge with the rule created by #3548982: Enforce removal of PHPUnit annotations from test classes' class metadata which I've just merged... good idea @mondrake and yes the group attribute should be on all tests.
The other question is what about the deprecation... I think we need to leave it there for contrib - but we should consider changing it to a E_USER_NOTICE and not silencing it - but let's tackle that in a separate issue.
Comment #8
alexpottAddressed #5
Comment #9
mondrakeCool.
Comment #10
mondrakeComment #12
catchCommitted/pushed to 11.x and cherry-picked to 11.3.x, thanks!