[Batch Plugin] Plugin implementations should use PHP attributes instead of annotations

Created on 25 July 2024, 5 months ago

Problem/Motivation

Drupal 10.2 change notices:
Plugin implementations should use PHP attributes instead of annotations
Plugin types should use PHP attributes instead of annotations

Many core plugins have been switched already:
Plugins converted from Annotations to Attributes in 10.3.0

No deprecation version has been set for when the core plugin managers will no longer accept Annotations, as they are presently coded to use Attributes, and fallback to Annotations; it is planned that Annotations will be deprecated in Drupal 11.
📌 Triggering deprecations for plugins using annotations when core plugin type has been converted to attributes Needs work

https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21Anno...
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21Plug...

Attribute-based plugins

Proposed resolution

For forward compatibility and to increase the window to developers to swap from Annotations, add Attribute as primary plugin discovery method.
- Fork new branch for Drupal 10.2+
- Add Attributes with fallback to Annotations for BC

This is where core adds Attribute as primary over Annotation:
https://git.drupalcode.org/project/drupal/-/commit/d7b47da6deda8a417760c...

Remaining tasks

All

User interface changes

None.

API changes

Developers using Batch Plugin will need to eventually update their plugins to use Attributes.

Data model changes

Plugins now use Attributes instead of Annotations.

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇦🇺Australia elc

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024