Updated: Comment 0

Problem/Motivation

Basically everything now uses provider instead of module, let's do the same for filters.

Proposed resolution

Remaining tasks

API changes

Original report by [username]

Comments

dawehner’s picture

StatusFileSize
new12.23 KB
eric_a’s picture

Issue tags: +beta target

Basically everything now uses provider instead of module

Yes, contrib maintainers should not have to deal with this kind of a plugin type API inconsistency. In fact, shouldn't this be a beta blocker?

Is there a meta for plugin usage and other usage?

eric_a’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: filter.patch, failed testing.

eric_a’s picture

Priority: Normal » Major
Status: Needs work » Needs review
Issue tags: -beta target +beta blocker
StatusFileSize
new12.23 KB

Rerolled.

-    module: filter
+    provider: filter
     status: '1'
     weight: '-10'

The context has changed a little after #2105959: Make sure all YML files in Filter module has no type-casting to string..

Currently contrib filter maintainers cannot leave out the provider annotation and they can't fix their plugins by putting in the key either...

Status: Needs review » Needs work

The last submitted patch, 5: filter-module-provider-2125045-5.patch, failed testing.

eric_a’s picture

Status: Needs work » Needs review
StatusFileSize
new1.34 KB
new13.72 KB
berdir’s picture

Status: Needs review » Needs work
Issue tags: -beta blocker +beta target
+++ b/core/modules/filter/lib/Drupal/filter/Plugin/FilterBase.php
@@ -71,7 +71,7 @@
     parent::__construct($configuration, $plugin_id, $plugin_definition);
 
-    $this->module = $this->pluginDefinition['module'];
+    $this->module = $this->pluginDefinition['provider'];
     $this->cache = $this->pluginDefinition['cache'];

Should be $this->provider, no?

Core maintainers decide what's a beta blocker, so reverting tag.

eric_a’s picture

Status: Needs work » Needs review
StatusFileSize
new671 bytes
new13.73 KB

Should be $this->provider, no?

Changed that.

Status: Needs review » Needs work

The last submitted patch, 9: filter-module-provider-2125045-9.patch, failed testing.

berdir’s picture

So that was actually hiding remaining usage of $filterplugin->module...

eric_a’s picture

Status: Needs work » Needs review
StatusFileSize
new540 bytes
new14.37 KB

Fixed FilterBag::sortHelper().

berdir’s picture

Status: Needs review » Reviewed & tested by the community

Nice, I think this is good to go then.

webchick’s picture

Title: Don't use module on filters anymore » Change notice: Don't use module on filters anymore
Status: Reviewed & tested by the community » Active
Issue tags: +Needs change record

Committed and pushed to 8.x. Thanks!

Let's get a change notice about this.

berdir’s picture

Title: Change notice: Don't use module on filters anymore » Don't use module on filters anymore
Status: Active » Fixed
Issue tags: -Needs change record

The user-facing part here is very small (there is no reason to use/access the provider/module, updated https://drupal.org/node/2015901 to remove the module in the example annotation. It also won't break anything if the module key is left there, so no need for a new change notice for this IMHO.

Status: Fixed » Closed (fixed)

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

eric_a’s picture