reverted: --- b/core/modules/system/src/Controller/SystemController.php +++ a/core/modules/system/src/Controller/SystemController.php @@ -15,7 +15,6 @@ use Drupal\Core\Menu\MenuLinkTreeInterface; use Drupal\Core\Menu\MenuTreeParameters; use Drupal\Core\Theme\ThemeAccessCheck; -use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Url; use Drupal\system\SystemManager; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -68,13 +67,6 @@ protected $menuLinkTree; /** - * The bootstrap cache service. - * - * @var \Drupal\Core\Cache\CacheBackendInterface - */ - protected $bootstrapCache; - - /** * Constructs a new SystemController. * * @param \Drupal\system\SystemManager $systemManager @@ -89,17 +81,14 @@ * The theme handler. * @param \Drupal\Core\Menu\MenuLinkTreeInterface * The menu link tree service. - * @parm \Drupal\Core\Cache\CacheBackendInterface - * The bootstrap cache service. */ + public function __construct(SystemManager $systemManager, QueryFactory $queryFactory, ThemeAccessCheck $theme_access, FormBuilderInterface $form_builder, ThemeHandlerInterface $theme_handler, MenuLinkTreeInterface $menu_link_tree) { - public function __construct(SystemManager $systemManager, QueryFactory $queryFactory, ThemeAccessCheck $theme_access, FormBuilderInterface $form_builder, ThemeHandlerInterface $theme_handler, MenuLinkTreeInterface $menu_link_tree, CacheBackendInterface $bootstrap_cache) { $this->systemManager = $systemManager; $this->queryFactory = $queryFactory; $this->themeAccess = $theme_access; $this->formBuilder = $form_builder; $this->themeHandler = $theme_handler; $this->menuLinkTree = $menu_link_tree; - $this->bootstrapCache = $bootstrap_cache; } /** @@ -112,8 +101,7 @@ $container->get('access_check.theme'), $container->get('form_builder'), $container->get('theme_handler'), + $container->get('menu.link_tree') - $container->get('menu.link_tree'), - $container->get('cache.bootstrap') ); } @@ -198,10 +186,6 @@ * @todo Move into ThemeController. */ public function themesPage() { - // Clean up the bootstrap "missing files" cache when listing themes. - $this->bootstrapCache->delete('drupal_get_filename:missing'); - drupal_static_reset('drupal_get_filename:missing'); - $config = $this->config('system.theme'); // Get all available themes. $themes = $this->themeHandler->rebuildThemeData(); reverted: --- b/core/modules/system/src/Form/ModulesListForm.php +++ a/core/modules/system/src/Form/ModulesListForm.php @@ -174,10 +174,6 @@ // Include system.admin.inc so we can use the sort callbacks. $this->moduleHandler->loadInclude('system', 'inc', 'system.admin'); - // Clean up the "missing files" cache when listing modules. - \Drupal::cache('bootstrap')->delete('drupal_get_filename:missing'); - drupal_static_reset('drupal_get_filename:missing'); - $form['filters'] = array( '#type' => 'container', '#attributes' => array( diff -u b/core/modules/system/src/Tests/Bootstrap/GetFilenameUnitTest.php b/core/modules/system/src/Tests/Bootstrap/GetFilenameUnitTest.php --- b/core/modules/system/src/Tests/Bootstrap/GetFilenameUnitTest.php +++ b/core/modules/system/src/Tests/Bootstrap/GetFilenameUnitTest.php @@ -86,11 +86,4 @@ // Restore the original error handler. restore_error_handler(); - - // Get the missing records static from drupal_get_filename. - $missing = &drupal_static('drupal_get_filename:missing'); - - // Searching for an item that does not exist creates a static record in - // drupal_get_filename(). - $this->assertTrue($missing['module'][$non_existing_module], 'Searching for an item that does not exist creates a static record in drupal_get_filename().'); } }