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.
REST resource plugins have a base class, but no interface. We really should have an interface also.
Comment | File | Size | Author |
---|---|---|---|
#4 | resource-interface-1874820-4.patch | 2.76 KB | klausi |
#4 | resource-interface-1874820-4-interdiff.txt | 483 bytes | klausi |
#2 | resource-interface-1874820-2.patch | 2.76 KB | klausi |
Comments
Comment #1
tim.plunkettThat's a good idea, but not really a major bug?
Comment #2
klausiAnd here comes the ResourceInterface, it lives right next to ResourceBase.
Comment #3
tim.plunkettShould be
Implements \ Drupal\rest\Plugin\ResourceInterface::permissions().
or routes().
Contains \Drupal\...
Comment #4
klausiThe \ 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."
Comment #5
tim.plunkettThat recent change to the namespaces rule is a bunch of crap, but its not this issue's fault. :)
Comment #6
catchCommitted/pushed to 8.x, thanks!