diff --git a/core/modules/rest/src/Entity/ConfigDependencies.php b/core/modules/rest/src/Entity/ConfigDependencies.php index 0f6930f..dfd92e4 100644 --- a/core/modules/rest/src/Entity/ConfigDependencies.php +++ b/core/modules/rest/src/Entity/ConfigDependencies.php @@ -57,14 +57,14 @@ public function calculateDependencies(RestResourceConfigInterface $rest_config) foreach ($rest_config->getSupportedAuthenticationProviders($request_method) as $auth) { if (isset($this->availableRestAuthentications[$auth])) { $module_name = $this->availableRestAuthentications[$auth]; - $dependencies['module'] = $module_name; + $dependencies['module'][] = $module_name; } } // Add dependencies based on the supported authentication formats. foreach ($rest_config->getSupportedFormats($request_method) as $format) { if (isset($this->availableRestFormats[$format])) { $module_name = $this->availableRestFormats[$format]; - $dependencies['module'] = $module_name; + $dependencies['module'][] = $module_name; } } } @@ -72,6 +72,7 @@ public function calculateDependencies(RestResourceConfigInterface $rest_config) if (($resource_plugin = $rest_config->getResourcePlugin()) && $resource_plugin instanceof DependentPluginInterface) { $dependencies = array_merge($dependencies, $resource_plugin->calculateDependencies()); } + debug($dependencies); return $dependencies; } diff --git a/core/modules/rest/src/Routing/ResourceRoutes.php b/core/modules/rest/src/Routing/ResourceRoutes.php index 7823e6c..74968fc 100644 --- a/core/modules/rest/src/Routing/ResourceRoutes.php +++ b/core/modules/rest/src/Routing/ResourceRoutes.php @@ -95,13 +95,13 @@ protected function getRoutesForResourceConfig(RestResourceConfigInterface $rest_ // Check that authentication providers are defined. if (empty($rest_resource_config->getSupportedAuthenticationProviders($method))) { - $this->logger->error('At least one authentication provider must be defined for resource @id', array(':id' => $id)); + $this->logger->error('At least one authentication provider must be defined for resource @id', array(':id' => $rest_resource_config->id())); continue; } // Check that formats are defined. if (empty($rest_resource_config->getSupportedFormats($method))) { - $this->logger->error('At least one format must be defined for resource @id', array(':id' => $id)); + $this->logger->error('At least one format must be defined for resource @id', array(':id' => $rest_resource_config->id())); continue; }