Problem/Motivation
As per https://www.drupal.org/node/3395582 not providing an attribute class is deprecated in 11.2
If we raise the minimum supported version to 10.2 then we can safely remove the annotations.
Steps to reproduce
N/A
Proposed resolution
- Add 7 new PHP 8 attribute classes in src/Attribute/ (one for each plugin type)
- Update all 7 plugin managers to support both attributes and annotations for backward compatibility
- Convert all core and test module plugins from annotations to attributes
- Preserve existing annotation classes in src/Annotation/ so contrib modules can migrate at their own pace
Remaining tasks
Do it
User interface changes
N/A
API changes
Annotations removed, attributes added.
Data model changes
N/A
Issue fork purge-3556305
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
Comment #4
kim.pepperI created a MR for this. I used Claude code to help automate the conversion of annotations to attributes.
I also added the
#[RunTestsInSeparateProcesses]attribute for all Kernel tests as this is now required for PHPUnit 12.Comment #5
kim.pepperComment #6
kim.pepperSecurity support for 10.2 ended 1 year and 4 months ago (17 Dec 2024)
Comment #7
kim.pepperSome of the test fails are due to deprecations. I created https://www.drupal.org/project/purge/issues/3587982 to deal with that.
Comment #8
kim.pepperRebased on 8.x-3.x