Now that we get full route objects from request objects we should rename the "plugin" property and retrieve it via the request.

#5 rest-plugin-1851768-5.patch2.23 KBklausi
PASSED: [[SimpleTest]]: [MySQL] 49,280 pass(es). View
#1 rest-plugin-1851768-1.patch2.25 KBklausi
PASSED: [[SimpleTest]]: [MySQL] 48,833 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


klausi’s picture

Status: Active » Needs review
2.25 KB
PASSED: [[SimpleTest]]: [MySQL] 48,833 pass(es). View

Patch attached.

Lars Toomre’s picture

I was surprised to see $this->plugin_id in this patch. I thought all class members are supposed to use camelCase naming convention (unless they were coming from an SQL table). Should this be changed either here or in a subsequent issue?

klausi’s picture

@Lars: that property is inherited from PluginManagerBase, so please file an issue against the plugin system.

klausi’s picture

Issue tags: +WSCCI


klausi’s picture

2.23 KB
PASSED: [[SimpleTest]]: [MySQL] 49,280 pass(es). View

Does not apply anymore, rerolled.

Crell’s picture

Status: Needs review » Reviewed & tested by the community

Seems sane to me.

webchick’s picture

Status: Reviewed & tested by the community » Fixed
+++ b/core/modules/rest/lib/Drupal/rest/RequestHandler.phpundefined
@@ -20,19 +20,16 @@ class RequestHandler extends ContainerAware {
+    $plugin = $request->attributes->get('_route')->getDefault('_plugin');

There wasn't really enough context in this issue to understand why we're doing this, but this line makes it a bit more clear. Looks like _plugin gets us parity with _route, so fair enough.

Committed and pushed to 8.x. Thanks!

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