From c4edd3bdcca242c69d356cf0ffd5ee61db94cad7 Mon Sep 17 00:00:00 2001 From: webchick <webchick@24967.no-reply.drupal.org> Date: Wed, 8 Jan 2014 00:27:24 -0800 Subject: [PATCH] Issue #2168101 by xjm: UpdateModuleHandler does not follow coding standards for switch statements and is hard to read. --- core/lib/Drupal/Core/Extension/UpdateModuleHandler.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/lib/Drupal/Core/Extension/UpdateModuleHandler.php b/core/lib/Drupal/Core/Extension/UpdateModuleHandler.php index 7d7ac9c93f3e..65f26a0bd60d 100644 --- a/core/lib/Drupal/Core/Extension/UpdateModuleHandler.php +++ b/core/lib/Drupal/Core/Extension/UpdateModuleHandler.php @@ -35,6 +35,7 @@ public function getImplementations($hook) { // Allow logging. case 'watchdog': return parent::getImplementations($hook); + // Forms and pages do not render without the basic elements defined in // system_element_info(). case 'element_info': @@ -44,6 +45,7 @@ public function getImplementations($hook) { // user_update_8011() uses public:// to create the image style directory. case 'stream_wrappers': return array('system'); + // This is called during rebuild to find testing themes. case 'system_theme_info': // Those are needed by user_access() to check access on update.php. @@ -51,10 +53,12 @@ public function getImplementations($hook) { case 'entity_load': case 'user_role_load': return array(); + // t() in system_stream_wrappers() needs this. Other schema calls aren't // supported. case 'schema': return array('locale'); + default: throw new \LogicException("Invoking hooks $hook is not supported during updates"); } -- GitLab