Posted by fago on December 27, 2012 at 12:45pm
7 followers
| Project: | Drupal core |
| Version: | 8.x-dev |
| Component: | rest.module |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
REST resource plugins have a base class, but no interface. We really should have an interface also.
Comments
#1
That's a good idea, but not really a major bug?
#2
And here comes the ResourceInterface, it lives right next to ResourceBase.
#3
+++ b/core/modules/rest/lib/Drupal/rest/Plugin/ResourceBase.phpundefined
@@ -14,17 +14,14 @@
+ * Implements ResourceInterface::permissions().
@@ -43,13 +40,7 @@ public function permissions() {
+ * Implements ResourceInterface::routes().
Should be
Implements \ Drupal\rest\Plugin\ResourceInterface::permissions().or routes().
+++ b/core/modules/rest/lib/Drupal/rest/Plugin/ResourceInterface.phpundefined@@ -0,0 +1,39 @@
+ * Contains Drupal\rest\Plugin\ResourceInterface.
Contains \Drupal\...
#4
The \ prefix for the @file doc block is a good idea.
Method overrides should NOT use the fully namespaced reference, see http://drupal.org/node/1354#namespaces : "Elsewhere in documentation, omit the namespace if the class/interface is within the use/namespace declaration context of the file."
#5
That recent change to the namespaces rule is a bunch of crap, but its not this issue's fault. :)
#6
Committed/pushed to 8.x, thanks!
#7
Automatically closed -- issue fixed for 2 weeks with no activity.