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\Core\ImageToolkit\Annotation\ImageToolkitplugins 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-3420991

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.

kim.pepper made their first commit to this issue’s fork.

kim.pepper’s picture

Status: Active » Needs review

Created a MR

mstrelan’s picture

Status: Needs review » Reviewed & tested by the community

Looks great. I think it's fine to omit the param docs for id and title. All ImageToolkit plugins have been converted to use annotations.

mstrelan’s picture

Status: Reviewed & tested by the community » Needs work

As per @larowlan I think we need to add public readonly ?string $deriver = NULL to the constructor params.

kim.pepper’s picture

Status: Needs work » Needs review

Adds a deriver property

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Appears all feedback has been addressed.

Did a search for @ImageToolkit and all 4 instances of core have been replaced.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed ffaf987160 to 11.x and e8b4e5c252 to 10.3.x. Thanks!

Adding to 3395575

  • alexpott committed d332de97 on 10.3.x
    Issue #3420991 follow-uo by alexpott: Convert ImageToolkit plugin...

  • alexpott committed e8b4e5c2 on 10.3.x
    Issue #3420991 by kim.pepper, larowlan, mstrelan: Convert ImageToolkit...

  • alexpott committed bd5aa8ff on 11.x
    Issue #3420991 follow-uo by alexpott: Convert ImageToolkit plugin...

  • alexpott committed ffaf9871 on 11.x
    Issue #3420991 by kim.pepper, larowlan, mstrelan: Convert ImageToolkit...
alexpott’s picture

I committed a quick follow-up now that this, #3420992: Convert ImageToolkitOperation plugin discovery to attributes and #3420996: Convert ImageEffect plugin discovery to attributes are all in - in order to link the attributes together instead of pointing at the annotations. See https://git.drupalcode.org/project/drupal/-/commit/bd5aa8ffbe851e1a5104a...

Status: Fixed » Closed (fixed)

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