.../node/tests/src/Functional/Rest/NodeTypeResourceTestBase.php | 2 +- core/modules/rest/rest.module | 1 - .../modules/rest/src/EventSubscriber/ResourceResponseSubscriber.php | 1 - core/modules/rest/src/RequestHandler.php | 1 - core/modules/rest/tests/src/Kernel/RequestHandlerTest.php | 6 ++---- 5 files changed, 3 insertions(+), 8 deletions(-) diff --git a/core/modules/node/tests/src/Functional/Rest/NodeTypeResourceTestBase.php b/core/modules/node/tests/src/Functional/Rest/NodeTypeResourceTestBase.php index 97861624de..77b39f4830 100644 --- a/core/modules/node/tests/src/Functional/Rest/NodeTypeResourceTestBase.php +++ b/core/modules/node/tests/src/Functional/Rest/NodeTypeResourceTestBase.php @@ -33,7 +33,7 @@ abstract class NodeTypeResourceTestBase extends EntityResourceTestBase { protected function setUpAuthorization($method) { $this->grantPermissionsToTestedRole([ 'administer content types', - 'access content' + 'access content', ]); } diff --git a/core/modules/rest/rest.module b/core/modules/rest/rest.module index fd5593464c..65ca866d95 100644 --- a/core/modules/rest/rest.module +++ b/core/modules/rest/rest.module @@ -7,7 +7,6 @@ use Drupal\Core\Url; use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\views\ViewEntityInterface; /** * Implements hook_help(). diff --git a/core/modules/rest/src/EventSubscriber/ResourceResponseSubscriber.php b/core/modules/rest/src/EventSubscriber/ResourceResponseSubscriber.php index c0efba0164..f425aed59f 100644 --- a/core/modules/rest/src/EventSubscriber/ResourceResponseSubscriber.php +++ b/core/modules/rest/src/EventSubscriber/ResourceResponseSubscriber.php @@ -5,7 +5,6 @@ use Drupal\Core\Cache\CacheableMetadata; use Drupal\Core\Cache\CacheableResponse; use Drupal\Core\Cache\CacheableResponseInterface; -use Drupal\Core\Render\RenderContext; use Drupal\Core\Render\RendererInterface; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\rest\ResourceResponseInterface; diff --git a/core/modules/rest/src/RequestHandler.php b/core/modules/rest/src/RequestHandler.php index 7e5e1724f5..b96daead30 100644 --- a/core/modules/rest/src/RequestHandler.php +++ b/core/modules/rest/src/RequestHandler.php @@ -4,7 +4,6 @@ use Drupal\Component\Utility\ArgumentsResolver; use Drupal\Core\Cache\CacheableResponseInterface; -use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\DependencyInjection\ContainerInjectionInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Routing\RouteMatchInterface; diff --git a/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php b/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php index 1f7d037cd5..73e3cd7ef9 100644 --- a/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php +++ b/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php @@ -2,8 +2,6 @@ namespace Drupal\Tests\rest\Kernel; -use Drupal\Core\Config\ConfigFactoryInterface; -use Drupal\Core\Config\ImmutableConfig; use Drupal\Core\Routing\RouteMatch; use Drupal\KernelTests\KernelTestBase; use Drupal\rest\Plugin\ResourceBase; @@ -93,11 +91,11 @@ public function testHandle() { */ class StubRequestHandlerResourcePlugin extends ResourceBase { - public function get($example = NULL, Request $request) {} + public function get($example = NULL, Request $request = NULL) {} public function post() {} - public function patch($example_original = NULL, Request $request) {} + public function patch($example_original = NULL, Request $request = NULL) {} public function delete() {}