diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index 19cf29b6de..7926623477 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -1064,38 +1064,6 @@ protected function initializeSettings(Request $request) { throw new BadRequestHttpException('The provided host name is not valid for this server.'); } } - - // If the class loader is still the same, possibly - // upgrade to an optimized class loader. - if ($class_loader_class == get_class($this->classLoader) - && Settings::get('class_loader_auto_detect', TRUE)) { - $prefix = Settings::getApcuPrefix('class_loader', $this->root); - $loader = NULL; - - // We autodetect one of the following three optimized classloaders, if - // their underlying extension exists. - if (function_exists('apcu_fetch')) { - $loader = new ApcClassLoader($prefix, $this->classLoader); - } - elseif (extension_loaded('wincache')) { - $loader = new WinCacheClassLoader($prefix, $this->classLoader); - } - elseif (extension_loaded('xcache')) { - $loader = new XcacheClassLoader($prefix, $this->classLoader); - } - if (!empty($loader)) { - $this->classLoader->unregister(); - $loader->register(); - $old_loader = $this->classLoader; - $this->classLoader = $loader; - // The optimized classloader might be persistent and store cache misses. - // For example, once a cache miss is stored in APCu clearing it on a - // specific web-head will not clear any other web-heads. Therefore - // fallback to the composer class loader that only statically caches - // misses. - $old_loader->register(); - } - } } /**