Issue #3602521 by marcelovani: Add the Group attribute so the test runs on Drupal 12
Builds on the bot's !14, which is correct as far as it goes but not enough on its own.
The version bumps let the module install on Drupal 12, but the test suite never runs there. Drupal 12 discovers tests by the PHPUnit Group attribute rather than the @group annotation, so run-tests.sh throws before running anything:
MissingGroupException: Missing group metadata in test
Drupal\Tests\rest_menu_items\Functional\RestMenuItemsTest::testRestMenuItemsRunTestsInSeparateProcesses goes with it — BrowserTestBase::setUp() on 12 throws without it. The @group annotation stays, so Drupal 10 and 11 are unaffected; both attributes are simply ignored by the older PHPUnit.
Tested with run-tests.sh in the drupalci containers:
| Core | Result |
|---|---|
| 10.6.15 | 1 pass |
| 11.4.5 | 1 pass |
| 12.0-dev (PHP 8.5.8) | 1 pass, 32 assertions |
Two things I did not touch, both Drupal 13 rather than 12, in case you want them separately:
ConfigFormneeds native return types ongetFormId(),buildForm(),create()andgetEditableConfigNames(), or the deprecation fires on every run.Using @RestResource annotation for plugin with ID rest_menu_item is deprecated and is removed from drupal:13.0.0.Converting to theDrupal\rest\Attribute\RestResourceattribute would drop support for Drupal 10 releases older than the one that added it, so it seemed like your call rather than mine.