Verified Commit 4985bc5a authored by godotislate's avatar godotislate
Browse files

task: #3588490 Don't reset the extension lists in system requirements

By: catch
By: berdir
By: alexpott
By: nicxvan
By: godotislate
(cherry picked from commit 7918d127)
parent 996c3830
Loading
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -267,10 +267,19 @@ public function get($extension_name) {
  /**
   * Returns all available extensions.
   *
   * @param bool $skip_cache
   *   Whether to skip the extension list cache.
   *
   * @return \Drupal\Core\Extension\Extension[]
   *   Processed extension objects, keyed by machine name.
   */
  public function getList() {
  public function getList(bool $skip_cache = FALSE) {
    if ($skip_cache) {
      // Although we're skipping the persistent cache, populate the extensions
      // class property so that any subsequent calls use the latest information.
      $this->extensions = $this->doList();
      return $this->extensions;
    }
    if ($this->extensions !== NULL) {
      return $this->extensions;
    }
+1 −1
Original line number Diff line number Diff line
@@ -310,7 +310,7 @@ public function systemAdminMenuBlockPage() {
  public function themesPage() {
    $config = $this->config('system.theme');
    // Get all available themes.
    $themes = $this->themeExtensionList->reset()->getList();
    $themes = $this->themeExtensionList->getList(TRUE);

    // Remove obsolete themes.
    $themes = array_filter($themes, function ($theme) {
+2 −5
Original line number Diff line number Diff line
@@ -63,13 +63,10 @@ public function checkRequirements(string $phase): array {
    // Get the current default PHP requirements for this version of Drupal.
    $minimum_supported_php = PhpRequirements::getMinimumSupportedPhp();

    // Reset the extension lists.
    /** @var \Drupal\Core\Extension\ModuleExtensionList $module_extension_list */
    $module_extension_list = \Drupal::service('extension.list.module');
    $module_extension_list->reset();
    /** @var \Drupal\Core\Extension\ThemeExtensionList $theme_extension_list */
    $theme_extension_list = \Drupal::service('extension.list.theme');
    $theme_extension_list->reset();
    $requirements = [];

    // Report Drupal version
@@ -928,8 +925,8 @@ public function checkRequirements(string $phase): array {
      ];
    };
    $profile = \Drupal::installProfile();
    $files = $module_extension_list->getList();
    $files += $theme_extension_list->getList();
    $files = $module_extension_list->getList(TRUE);
    $files += $theme_extension_list->getList(TRUE);
    $core_incompatible_extensions = [];
    $php_incompatible_extensions = [];
    foreach ($files as $extension_name => $file) {