Similar to #1810480: Provide the plugin_id to support views metadata integration, we will benefit from also having the module that implemented or owns the plugin.

This is in preparation for what we will do with broken/missing handlers. Which is also related to #1823608: Admin views in core.

Postpone on this #2016953: Indicate when an optional handler is missing, that it is not "broken"

Files: 
CommentFileSizeAuthor
#38 1825896-38.patch133.67 KBdamiankloip
PASSED: [[SimpleTest]]: [MySQL] 56,831 pass(es).
[ View ]
#38 interdiff-1825896-38.txt7.59 KBdamiankloip
#35 drupal-Views-module-owner-1825896-35.patch134.26 KBheddn
PASSED: [[SimpleTest]]: [MySQL] 56,470 pass(es).
[ View ]
#35 interdiff.txt3.67 KBheddn
#33 drupal-Views-module-owner-1825896-33.patch133.14 KBheddn
FAILED: [[SimpleTest]]: [MySQL] 58,074 pass(es), 1 fail(s), and 26 exception(s).
[ View ]
#33 interdiff.txt123.74 KBheddn
#30 drupal-Views-module-owner-1825896-31.patch131.96 KBheddn
FAILED: [[SimpleTest]]: [MySQL] 56,723 pass(es), 4 fail(s), and 26 exception(s).
[ View ]
#25 1825896-24.patch125.75 KBdamiankloip
FAILED: [[SimpleTest]]: [MySQL] 56,447 pass(es), 5 fail(s), and 26 exception(s).
[ View ]
#25 interdiff-1825896-24.txt5.36 KBdamiankloip
#23 1825896-23.patch121.24 KBdamiankloip
FAILED: [[SimpleTest]]: [MySQL] 57,973 pass(es), 2 fail(s), and 0 exception(s).
[ View ]
#17 drupal-1825896-17.patch96.62 KBdawehner
PASSED: [[SimpleTest]]: [MySQL] 54,402 pass(es).
[ View ]
#17 interdiff.txt2.74 KBdawehner
#15 drupal-1825896-15.patch95.98 KBdawehner
FAILED: [[SimpleTest]]: [MySQL] 54,481 pass(es), 5 fail(s), and 0 exception(s).
[ View ]
#11 drupal-1825896-11.patch95.97 KBdawehner
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal-1825896-11.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#9 drupal-1825896-9.patch95.99 KBdawehner
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal-1825896-9.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#9 test.txt1.22 KBdawehner
#5 drupal-1825896-5.patch53.87 KBdawehner
FAILED: [[SimpleTest]]: [MySQL] 46,380 pass(es), 5 fail(s), and 0 exception(s).
[ View ]
#3 scripts.txt1.34 KBdawehner
#3 drupal-1825896-3.patch55.71 KBdawehner
FAILED: [[SimpleTest]]: [MySQL] 46,365 pass(es), 5 fail(s), and 0 exception(s).
[ View ]
#2 1825896.patch913 bytesdamiankloip
FAILED: [[SimpleTest]]: [MySQL] 46,350 pass(es), 4 fail(s), and 0 exception(s).
[ View ]

Comments

Title:Add implementing module to plugin data on display handlersAdd module owner to plugin data on display handlers

StatusFileSize
new913 bytes
FAILED: [[SimpleTest]]: [MySQL] 46,350 pass(es), 4 fail(s), and 0 exception(s).
[ View ]

This should be very quick to implement, we just add this to addItem.

Now we just need to add this to all the current YAML files.... *Looks at dawehner*

Status:Active» Needs review
StatusFileSize
new55.71 KB
FAILED: [[SimpleTest]]: [MySQL] 46,365 pass(es), 5 fail(s), and 0 exception(s).
[ View ]
new1.34 KB

Updated all the yml files with the script in the attachment.

Just linking an issue with does something related but at the exact space in code. #1810480: Provide the plugin_id to support views metadata integration

Status:Needs review» Needs work

The last submitted patch, drupal-1825896-3.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new53.87 KB
FAILED: [[SimpleTest]]: [MySQL] 46,380 pass(es), 5 fail(s), and 0 exception(s).
[ View ]

Let's postpone this on #1810480: Provide the plugin_id to support views metadata integration as it requires the same kind of assertions.

Status:Needs review» Postponed

.

Status:Postponed» Active

As per #5

Status:Active» Needs review
StatusFileSize
new1.22 KB
new95.99 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal-1825896-9.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Here is an initial patch, which also fixes some of the yml files, so my script could work.

Status:Needs review» Needs work

The last submitted patch, drupal-1825896-9.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new95.97 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal-1825896-11.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Just a rerole. (frontpage got changed)

Status:Needs review» Needs work
Issue tags:-DX (Developer Experience), -VDC

The last submitted patch, drupal-1825896-11.patch, failed testing.

Status:Needs work» Needs review

#11: drupal-1825896-11.patch queued for re-testing.

Status:Needs review» Needs work
Issue tags:+DX (Developer Experience), +VDC

The last submitted patch, drupal-1825896-11.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new95.98 KB
FAILED: [[SimpleTest]]: [MySQL] 54,481 pass(es), 5 fail(s), and 0 exception(s).
[ View ]

Yet another one.

Status:Needs review» Needs work

The last submitted patch, drupal-1825896-15.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new2.74 KB
new96.62 KB
PASSED: [[SimpleTest]]: [MySQL] 54,402 pass(es).
[ View ]

It's great to see that our test coverage works properly.

Status:Needs review» Needs work
Issue tags:-DX (Developer Experience), -VDC

The last submitted patch, drupal-1825896-17.patch, failed testing.

Status:Needs work» Needs review
Issue tags:+DX (Developer Experience), +VDC

#17: drupal-1825896-17.patch queued for re-testing.

Status:Needs review» Needs work
Issue tags:+Needs reroll

Needs 100% another rerole/another run of the script.

Status:Needs work» Postponed

It's not that easy to get the actual module owner anymore, so I opened #2022087: Add module owner to plugin definition in AnnotatedClassDiscovery. This is pretty dependent on that I would say.

Status:Postponed» Needs work

Status:Needs work» Needs review
StatusFileSize
new121.24 KB
FAILED: [[SimpleTest]]: [MySQL] 57,973 pass(es), 2 fail(s), and 0 exception(s).
[ View ]

OK, here goes.....

Now that issue dep (in #21/#22) is in, we can try this again. After that got in though, I realised that views' ViewsHandlerDiscovery actually extends the Component AnnotatedClassDiscovery and not the Core implementation, so we also need to change that too.

To make things easier, these are the changes in this patch that have been made to ViewsHandlerDiscovery:

diff --git a/core/modules/views/lib/Drupal/views/Plugin/Discovery/ViewsHandlerDiscovery.php b/core/modules/views/lib/Drupal/views/Plugin/Discovery/ViewsHandlerDiscovery.php
index 51664cb..460ef5a 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/Discovery/ViewsHandlerDiscovery.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/Discovery/ViewsHandlerDiscovery.php
@@ -7,7 +7,7 @@
namespace Drupal\views\Plugin\Discovery;
-use Drupal\Component\Plugin\Discovery\AnnotatedClassDiscovery;
+use Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery;
/**
  * Defines a discovery mechanism to find Views handlers in PSR-0 namespaces.
@@ -48,7 +48,10 @@ function __construct($type, \Traversable $root_namespaces) {
     foreach ($root_namespaces as $namespace => $dir) {
       $plugin_namespaces["$namespace\\Plugin\\views\\{$type}"] = array($dir);
     }
-    parent::__construct($plugin_namespaces, $annotation_namespaces, 'Drupal\Component\Annotation\PluginID');
+
+    $this->pluginNamespaces = $plugin_namespaces;
+    $this->annotationNamespaces = $annotation_namespaces;
+    $this->pluginDefinitionAnnotationName = 'Drupal\Component\Annotation\PluginID';
   }
   /**

The rest is just alot of small yaml changes.

Status:Needs review» Needs work

The last submitted patch, 1825896-23.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new5.36 KB
new125.75 KB
FAILED: [[SimpleTest]]: [MySQL] 56,447 pass(es), 5 fail(s), and 26 exception(s).
[ View ]

And with the actual code to add plugin ID to newly added handlers.

I also had to fix the failing UserDataTest. When I changed/added the module key for handlers, this failed as the options were storing 'module' for the module that user data should be loaded for. I changed these options to 'data_module' and 'data_name' - should pass now.

Issue tags:-Needs reroll

.

Status:Needs review» Needs work

The last submitted patch, 1825896-24.patch, failed testing.

If changes in #2022087: Add module owner to plugin definition in AnnotatedClassDiscovery get in, we maybe want to change this too.

Status:Needs work» Needs review
StatusFileSize
new131.96 KB
FAILED: [[SimpleTest]]: [MySQL] 56,723 pass(es), 4 fail(s), and 26 exception(s).
[ View ]

Let's see how this goes.

Status:Needs review» Needs work

The last submitted patch, drupal-Views-module-owner-1825896-31.patch, failed testing.

#30, see comments in #28/#29

Status:Needs work» Needs review
StatusFileSize
new123.74 KB
new133.14 KB
FAILED: [[SimpleTest]]: [MySQL] 58,074 pass(es), 1 fail(s), and 26 exception(s).
[ View ]

This seems to get us closer. But there are probably still a few errors on tests.

Status:Needs review» Needs work

The last submitted patch, drupal-Views-module-owner-1825896-33.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new3.67 KB
new134.26 KB
PASSED: [[SimpleTest]]: [MySQL] 56,470 pass(es).
[ View ]

I fixed an overlooked omission in views.view.test_user_data.yml from #25. Then I had to make some changes in WizardPluginBase.php. The changes made make sense to me, but I'd like another set of eyes.

Status:Needs review» Reviewed & tested by the community

Let's get it in as fast as possible!

Priority:Normal» Major
Issue tags:+Avoid commit conflicts

Not sure if this tag does anything these days.

Because #1822048: Consider improving/removing the concept of "broken" handlers has left us in an unshippable state, and this blocks it, bumping.

Status:Reviewed & tested by the community» Needs review
StatusFileSize
new7.59 KB
new133.67 KB
PASSED: [[SimpleTest]]: [MySQL] 56,831 pass(es).
[ View ]

Sorry, just a couple of things; The assignment of the provider in WizardPluginBase was still checking for 'module', there were also some missing 'provider' keys in the wizard extending classes.

Status:Needs review» Reviewed & tested by the community

Good catch!

Title:Add module owner to plugin data on display handlersAdd module owner to plugin data on handlers

Status:Reviewed & tested by the community» Fixed
Issue tags:-Avoid commit conflicts

Committed a4c65be and pushed to 8.x. Thanks!

+++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/wizard/Comment.phpundefined
@@ -54,12 +54,14 @@ class Comment extends WizardPluginBase {
-      'field' => 'status'
+      'field' => 'status',
+      'provider' => 'user'
...
       'field' => 'status',
+      'provider' => 'user',

This change is wrong! needs follow-up

Please post a new issue and tag it as novice.

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

Issue summary:View changes

Updated issue summary.