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\ViewsSortplugins 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

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3426961

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

mstrelan created an issue. See original summary.

Ruturaj Chaubey made their first commit to this issue’s fork.

mstrelan’s picture

Status: Active » Postponed

This should probably be postponed on #3426955: Convert ViewsField plugin discovery to attributes which adds ViewsHandlerAttributeBase.

mstrelan’s picture

Turns out we don't need ViewsHandlerAttributeBase, but we will still need the changes to ViewsHandlerManager, so this is still postponed.

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

sorlov’s picture

Status: Postponed » Needs review
smustgrave’s picture

Status: Needs review » Needs work

Appears to have a test failure

sorlov’s picture

Status: Needs work » Needs review
mstrelan’s picture

Status: Needs review » Needs work

Left a comment about the base class for the attribute class.

Also, let's update the description in \Drupal\views\Plugin\views\sort\SortPluginBase to mention attributes instead of annotations.

sorlov’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Feedback appears to be addressed.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 77ccadfb80 to 11.x and e4791b4381 to 10.3.x. Thanks!

  • alexpott committed e4791b43 on 10.3.x
    Issue #3426961 by sorlov, Ruturaj Chaubey, mstrelan, smustgrave: Convert...

  • alexpott committed 77ccadfb on 11.x
    Issue #3426961 by sorlov, Ruturaj Chaubey, mstrelan, smustgrave: Convert...

Status: Fixed » Closed (fixed)

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