Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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\ViewsRelationship
plugins to use Attributes.
Proposed resolution
- Add a class to represent the new Attribute - Example
- Update the plugin manager constructor to include both the attribute and annotation class names - example
- 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-3426956
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
Comment #3
mstrelan CreditAttribution: mstrelan at PreviousNext commentedPostponed on #3426955: Convert ViewsField plugin discovery to attributes which has the required changes to
ViewsHandlerManager
.Comment #5
sorlov CreditAttribution: sorlov at Skilld commentedComment #6
smustgrave CreditAttribution: smustgrave at Mobomo commentedAppears to have a test failure, may need a rebase
Comment #7
smustgrave CreditAttribution: smustgrave at Mobomo commentedHad some bandwidth and rebased which resolved the test failure and MR wasn't in draft so went ahead and reviewed.
Searching core all 5 instances of @ViewsRelationship have been replaced
Comment #8
alexpottCommitted and pushed 27b07de8bb to 11.x and b6ef30f27b to 10.3.x. Thanks!