Problem/Motivation

Starting in Drupal 10.2.0, plugins should be defined with PHP attributes instead of annotations.
When defining new plugin instances you should prefer PHP Attributes over annotations assuming the underlying plugin manager has been updated to support the use of attributes.

Proposed resolution

Allow PHP attributes for plugin definitions, as per https://www.drupal.org/docs/drupal-apis/plugin-api/attribute-based-plugins

Command icon 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

svendecabooter created an issue. See original summary.

jsacksick’s picture

Yep, I've been telling myself I should do this when I get the time, did it in Commerce already, are you going to work on this?

svendecabooter’s picture

I could work on this if I find some time. Currently just reporting this, without intent to immediately provide some code.

jsacksick’s picture

Status: Active » Needs review

Tests are passing!

  • jsacksick committed babbbf67 on 8.x-1.x
    Issue #3520736 by svendecabooter, jsacksick: Support attribute-based...
jsacksick’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.