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\views\Annotation\ViewsCacheplugins to use Attributes.

There is no need to wait for the base class \Drupal\views\Annotation\ViewsPluginAnnotationBase as this plugin does not use that feature. It should instead extend from the base Plugin attribute in core.

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-3421009

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.

larowlan’s picture

Title: [PP-1] Convert ViewsCache plugin discovery to attributes » Convert ViewsCache plugin discovery to attributes
Issue summary: View changes
Status: Postponed » Active
Related issues: -#3421006: Convert ViewsDisplayExtender plugin discovery to attributes

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

sorlov’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative

Believe this needs The deriver class. that the other attributes have.

sorlov’s picture

Status: Needs work » Needs review

added deriver

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Deriver was added.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

Added some suggestions to improve typehinting on the MR.

sorlov’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Feedback has been applied

larowlan’s picture

Status: Reviewed & tested by the community » Needs work

Couple of minor nits, nice work 🙌

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

sorlov’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Feedback appears addressed.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed c077be8 and pushed to 11.x. Thanks!
Committed d0f5f17 and pushed to 10.3.x. Thanks!

  • alexpott committed ac8556f3 on 10.3.x
    Issue #3421009 by sorlov, mohit_aghera, pradhumanjain2311, larowlan,...

  • alexpott committed fb49143f on 11.x
    Issue #3421009 by sorlov, mohit_aghera, pradhumanjain2311, larowlan,...

Status: Fixed » Closed (fixed)

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