diff -u b/core/includes/install.core.inc b/core/includes/install.core.inc --- b/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -305,6 +305,7 @@ // Before having installed the system module and being able to do a module // rebuild, prime the drupal_get_filename() static cache with the module's // exact location. + // @todo Remove as part of https://www.drupal.org/node/2186491 drupal_get_filename('module', 'system', 'core/modules/system/system.info.yml'); // If the hash salt leaks, it becomes possible to forge a valid testing user @@ -1036,6 +1037,7 @@ // Before installing the user module, perform a module rebuild so we know // where the user module is located. + // @todo Remove as part of https://www.drupal.org/node/2186491 system_rebuild_module_data(); // Enable the user module so that sessions can be recorded during the // upcoming bootstrap step. diff -u b/core/includes/install.inc b/core/includes/install.inc --- b/core/includes/install.inc +++ b/core/includes/install.inc @@ -925,6 +925,7 @@ // Performs an ExtensionDiscovery scan as the system module is unavailable and // we don't yet know where all the modules are located. + // @todo Remove as part of https://www.drupal.org/node/2186491 $listing = new ExtensionDiscovery(\Drupal::root()); $module_list = $listing->scan('module'); foreach ($info['dependencies'] as $module) { diff -u b/core/lib/Drupal/Core/Config/ExtensionInstallStorage.php b/core/lib/Drupal/Core/Config/ExtensionInstallStorage.php --- b/core/lib/Drupal/Core/Config/ExtensionInstallStorage.php +++ b/core/lib/Drupal/Core/Config/ExtensionInstallStorage.php @@ -85,6 +85,7 @@ $install_profile = Settings::get('install_profile'); $extensions = $this->configStorage->read('core.extension'); + // @todo Remove as part of https://www.drupal.org/node/2186491 $listing = new ExtensionDiscovery(\Drupal::root()); if (!empty($extensions['module'])) { $modules = $extensions['module']; diff -u b/core/lib/Drupal/Core/Config/InstallStorage.php b/core/lib/Drupal/Core/Config/InstallStorage.php --- b/core/lib/Drupal/Core/Config/InstallStorage.php +++ b/core/lib/Drupal/Core/Config/InstallStorage.php @@ -161,6 +161,7 @@ $this->folders += $this->getCoreNames(); // Perform an ExtensionDiscovery scan as we cannot use drupal_get_path() // yet because the system module may not yet be enabled during install. + // @todo Remove as part of https://www.drupal.org/node/2186491 $listing = new ExtensionDiscovery(\Drupal::root()); if ($profile = drupal_get_profile()) { $profile_list = $listing->scan('profile'); @@ -168,6 +169,7 @@ $this->folders += $this->getComponentNames(array($profile_list[$profile])); } } + // @todo Remove as part of https://www.drupal.org/node/2186491 $this->folders += $this->getComponentNames($listing->scan('module')); $this->folders += $this->getComponentNames($listing->scan('theme')); } diff -u b/core/modules/config/src/Tests/ConfigDependencyTest.php b/core/modules/config/src/Tests/ConfigDependencyTest.php --- b/core/modules/config/src/Tests/ConfigDependencyTest.php +++ b/core/modules/config/src/Tests/ConfigDependencyTest.php @@ -186,6 +186,7 @@ $entity2->save(); // Perform a module rebuild so we can know where the node module is located. // and uninstall it. + // @todo Remove as part of https://www.drupal.org/node/2186491 system_rebuild_module_data(); // Test that doing a config uninstall of the node module deletes entity2 // since it is dependent on entity1 which is dependent on the node module. diff -u b/core/modules/simpletest/src/KernelTestBase.php b/core/modules/simpletest/src/KernelTestBase.php --- b/core/modules/simpletest/src/KernelTestBase.php +++ b/core/modules/simpletest/src/KernelTestBase.php @@ -487,6 +487,7 @@ // Perform an ExtensionDiscovery scan as this function may receive a // profile that is not the current profile, and we don't yet have a cached // way to receive inactive profile information. + // @todo Remove as part of https://www.drupal.org/node/2186491 $listing = new ExtensionDiscovery(\Drupal::root()); $module_list = $listing->scan('module'); // In ModuleHandlerTest we pass in a profile as if it were a module. 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 @@ -26,6 +26,7 @@ $install_state['parameters']['profile'] = 'testing'; // Rebuild system.module.files state data. + // @todo Remove as part of https://www.drupal.org/node/2186491 drupal_static_reset('system_rebuild_module_data'); system_rebuild_module_data(); diff -u b/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php b/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php --- b/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php +++ b/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php @@ -27,6 +27,7 @@ parent::setUp(); // Set up the state values so we know where to find the files when running // drupal_get_filename(). + // @todo Remove as part of https://www.drupal.org/node/2186491 system_rebuild_module_data(); } @@ -47,6 +48,7 @@ // Prime the drupal_get_filename() static cache with the location of the // testing profile as it is not the currently active profile and we don't // yet have any cached way to retrieve its location. + // @todo Remove as part of https://www.drupal.org/node/2186491 drupal_get_filename('profile', 'testing', 'core/profiles/testing/testing.info.yml'); // Build a list of modules, sorted alphabetically. $profile_info = install_profile_info('testing', 'en'); @@ -198,6 +200,7 @@ // Prime the drupal_get_filename() static cache with the location of the // minimal profile as it is not the currently active profile and we don't // yet have any cached way to retrieve its location. + // @todo Remove as part of https://www.drupal.org/node/2186491 drupal_get_filename('profile', 'minimal', 'core/profiles/' . $profile . '/' . $profile . '.info.yml'); $this->enableModules(array('module_test', $profile)); diff -u b/core/modules/system/src/Tests/Extension/ThemeHandlerTest.php b/core/modules/system/src/Tests/Extension/ThemeHandlerTest.php --- b/core/modules/system/src/Tests/Extension/ThemeHandlerTest.php +++ b/core/modules/system/src/Tests/Extension/ThemeHandlerTest.php @@ -317,6 +317,7 @@ $this->assertFalse(isset($themes[$name]->info['regions']['test_region'])); // Rebuild module data so we know where module_test is located. + // @todo Remove as part of https://www.drupal.org/node/2186491 system_rebuild_module_data(); $this->moduleInstaller()->install(array('module_test'), FALSE); $this->assertTrue($this->moduleHandler()->moduleExists('module_test')); diff -u b/core/modules/system/src/Tests/File/ScanDirectoryTest.php b/core/modules/system/src/Tests/File/ScanDirectoryTest.php --- b/core/modules/system/src/Tests/File/ScanDirectoryTest.php +++ b/core/modules/system/src/Tests/File/ScanDirectoryTest.php @@ -31,6 +31,7 @@ // Hardcode the location of the simpletest files as it is already known // and shouldn't change, and we don't yet have a way to retreive their // location from drupal_get_filename() in a cached way. + // @todo Remove as part of https://www.drupal.org/node/2186491 $this->path = 'core/modules/simpletest/files'; } diff -u b/core/modules/system/src/Tests/Installer/InstallerLanguageTest.php b/core/modules/system/src/Tests/Installer/InstallerLanguageTest.php --- b/core/modules/system/src/Tests/Installer/InstallerLanguageTest.php +++ b/core/modules/system/src/Tests/Installer/InstallerLanguageTest.php @@ -30,6 +30,8 @@ 'it' => array(), ); + // Hardcode the simpletest module location as we don't yet know where it is. + // @todo Remove as part of https://www.drupal.org/node/2186491 $file_translation = new FileTranslation('core/modules/simpletest/files/translations'); foreach ($expected_translation_files as $langcode => $files_expected) { $files_found = $file_translation->findTranslationFiles($langcode); diff -u b/core/modules/system/src/Tests/Path/UrlAliasFixtures.php b/core/modules/system/src/Tests/Path/UrlAliasFixtures.php --- b/core/modules/system/src/Tests/Path/UrlAliasFixtures.php +++ b/core/modules/system/src/Tests/Path/UrlAliasFixtures.php @@ -82,6 +82,7 @@ // Prime the drupal_get_filename() cache with the location of the system // module as its location is known and shouldn't change. + // @todo Remove as part of https://www.drupal.org/node/2186491 drupal_get_filename('module', 'system', 'core/modules/system/system.info.yml'); module_load_install('system'); $schema = system_schema(); diff -u b/core/modules/system/system.module b/core/modules/system/system.module --- b/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -884,15 +884,16 @@ function _system_rebuild_module_data() { $listing = new ExtensionDiscovery(\Drupal::root()); - // Find installation profiles. This needs to happen before - // performing a module scan as the module scan requires knowing - // what the active profile is. - $profiles = $listing->scan('profile'); + // Find installation profiles. This needs to happen before performing a + // module scan as the module scan requires knowing what the active profile is. + // @todo Remove as part of https://www.drupal.org/node/2186491 + $profiles = $liseing->scan('profile'); $profile = drupal_get_profile(); if ($profile && isset($profiles[$profile])) { // Prime the drupal_get_filename() static cache with the profile info file // location so we can use drupal_get_path() on the active profile during // the module scan. + // @todo Remove as part of https://www.drupal.org/node/2186491 drupal_get_filename('profile', $profile, $profiles[$profile]->getPathname()); }