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\ViewsArgumentDefaultplugins 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-3421003

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

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

quietone’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Needs work

Think we need to add the deriver class.

sorlov 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
Issue tags: +Needs Review Queue Initiative

Deriver class has been added and all instances replaced.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

no_ui is the wrong type. Added suggestions to the MR

sorlov’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Suggestions appeared to be applied.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

Added some comments to the MR - one needs to be addressed before we can proceed.

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

Opened #3433268: Use plugin short_title for admin summary in ViewsArgumentDefault as a follow up for short_title

Rest of feedback appears to be addressed.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

Added comments to the MR

quietone’s picture

Status: Needs work » Needs review

Setting to NR for review of my comments.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Appears all feedback has been addressed, searched repo and all 9 instances of @ViewsArgumentDefault have been replaced.

alexpott’s picture

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

Committed and pushed 699475890f to 11.x and a83f56d6c5 to 10.3.x. Thanks!

  • alexpott committed 969cdfb1 on 10.3.x
    Issue #3421003 by sorlov, quietone, pradhumanjain2311, smustgrave,...

  • alexpott committed 5f6b8632 on 11.x
    Issue #3421003 by sorlov, quietone, pradhumanjain2311, smustgrave,...

Status: Fixed » Closed (fixed)

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