Problem/Motivation

In #3252386: Use PHP attributes instead of doctrine annotations we added support for attribute based plugin discovery.
As part of that issue we converted block and action plugins.

This issue is to convert \Drupal\filter\Annotation\Filterplugins to use Attributes.

Proposed resolution

  1. Add a class to represent the new Attribute - Example
  2. Update the plugin manager constructor to include both the attribute and annotation class names - example
  3. Convert all plugins that use the annotation to use the new attribute - example

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3421012

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

larowlan created an issue. See original summary.

quietone made their first commit to this issue’s fork.

quietone’s picture

Status: Active » Needs review

Time for feedback.

mstrelan’s picture

Status: Needs review » Needs work

Added some suggestions mostly the same as on the Mail issue but didn't get through the whole MR.

quietone’s picture

Status: Needs work » Needs review
mstrelan’s picture

Status: Needs review » Needs work

Couple nits but also I don't think the last few params should be nullable.

sakthi_dev made their first commit to this issue’s fork.

mstrelan’s picture

FWIW I opened #3424769: Create enum for FilterInterface:TYPE_* constants which is relevant, but not a blocker, for this issue.

sorlov made their first commit to this issue’s fork.

sorlov’s picture

Status: Needs work » Needs review
wim leers’s picture

Status: Needs review » Needs work

I really wanted to RTBC this, but there are a few incorrect default values here that would cause regressions after contrib adopts this.

This is 99% ready, nice job! 🥳

sorlov’s picture

Status: Needs work » Needs review
wim leers’s picture

Status: Needs review » Reviewed & tested by the community

Looks good! :)

alexpott’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 1d07b82287 to 11.x and 1e89b0ca64 to 10.3.x. Thanks!

  • alexpott committed 1e89b0ca on 10.3.x
    Issue #3421012 by sorlov, quietone, sakthi_dev, mstrelan, Wim Leers:...

  • alexpott committed 1d07b822 on 11.x
    Issue #3421012 by sorlov, quietone, sakthi_dev, mstrelan, Wim Leers:...
wim leers’s picture

Thanks, that really paves the path for #3424769: Create enum for FilterInterface:TYPE_* constants 👍

Status: Fixed » Closed (fixed)

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