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\ViewsArgumentValidatorplugins 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-3421010

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 ViewsArgumentValidator plugin discovery to attributes » Convert ViewsArgumentValidator plugin discovery to attributes
Issue summary: View changes
Status: Postponed » Active
Related issues: -#3421006: Convert ViewsDisplayExtender plugin discovery to attributes

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

sorlov’s picture

Status: Active » Needs work

Added class to represent new Attribute and converted all plugins that use the annotation to use this new attribute

But we need changes for ViewsPluginManager implemented in https://www.drupal.org/project/drupal/issues/3421006 to include both attribute and annotation class names

sorlov’s picture

Status: Needs work » Needs review

https://www.drupal.org/project/drupal/issues/3421006 was merged

so task is ready for review now

smustgrave’s picture

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

See all 6 instances of @ViewsArgumentValidator have been replaced and attribute has the deriver.

alexpott’s picture

Version: 11.x-dev » 10.3.x-dev

Committed and pushed cb857b7884 to 11.x and 152b81691b to 10.3.x. Thanks!

  • alexpott committed 152b8169 on 10.3.x
    Issue #3421010 by sorlov, larowlan, smustgrave: Convert...

  • alexpott committed cb857b78 on 11.x
    Issue #3421010 by sorlov, larowlan, smustgrave: Convert...
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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