diff --git a/core/modules/rest/lib/Drupal/rest/EventSubscriber/RouteSubscriber.php b/core/modules/rest/lib/Drupal/rest/EventSubscriber/RouteSubscriber.php index a4a9aeb..c5a8d8e 100644 --- a/core/modules/rest/lib/Drupal/rest/EventSubscriber/RouteSubscriber.php +++ b/core/modules/rest/lib/Drupal/rest/EventSubscriber/RouteSubscriber.php @@ -75,7 +75,7 @@ public function dynamicRoutes(RouteBuildEvent $event) { // If there is no format requirement or if it matches the // configuration also add the route. $format_requirement = $route->getRequirement('_format'); - if (!$format_requirement || empty($method_settings['supportedFormats']) || in_array($format_requirement, $enabled_methods[$method]['supportedFormats'])) { + if (!$format_requirement || empty($method_settings['supported_formats']) || in_array($format_requirement, $enabled_methods[$method]['supported_formats'])) { $collection->add("rest.$name", $route); } } diff --git a/core/modules/rest/lib/Drupal/rest/RequestHandler.php b/core/modules/rest/lib/Drupal/rest/RequestHandler.php index 045f71d..c7c1c62 100644 --- a/core/modules/rest/lib/Drupal/rest/RequestHandler.php +++ b/core/modules/rest/lib/Drupal/rest/RequestHandler.php @@ -52,7 +52,7 @@ public function handle(Request $request, $id = NULL) { // that bubbles up to the client. $config = $this->container->get('config.factory')->get('rest.settings')->get('resources'); $method_settings = $config[$plugin][$request->getMethod()]; - if (empty($method_settings['supportedFormats']) || in_array($format, $method_settings['supportedFormats'])) { + if (empty($method_settings['supported_formats']) || in_array($format, $method_settings['supported_formats'])) { $definition = $resource->getPluginDefinition(); $class = $definition['serialization_class']; try { diff --git a/core/modules/rest/lib/Drupal/rest/Tests/RESTTestBase.php b/core/modules/rest/lib/Drupal/rest/Tests/RESTTestBase.php index 6aa1377..f1817d7 100644 --- a/core/modules/rest/lib/Drupal/rest/Tests/RESTTestBase.php +++ b/core/modules/rest/lib/Drupal/rest/Tests/RESTTestBase.php @@ -195,7 +195,7 @@ protected function enableService($resource_type, $method = 'GET', $format = NULL $settings = array(); if ($resource_type) { if ($format) { - $settings[$resource_type][$method]['supportedFormats'][] = $format; + $settings[$resource_type][$method]['supported_formats'][] = $format; } else { $settings[$resource_type][$method] = array();