The purpose of FeaturesInstallStorage is to mimic the core ExtensionInstallStorage except it reads configuration from modules that are not installed.

In the latest few D8 betas, the ExtensionInstallStorage::getAllFolders() function has changed extensively. In fact, it now performs a full module scan, so it *almost* handles uninstalled modules.

The patch in #2497155: getComponentNames must be of the type array didn't correctly refactor this when the getComponentNames() function changed it's API. After the patch it is functional, however, it is doing a bunch of duplicate code since the protected getAllModules() that was added is doing the same listing scan that is already in the core getAllFolders().

We can greatly simplify this service now by removing getAllModules() and just using the scan listing already being executed.

Here is the patch to -dev to get this back to something that more closely matches the core service.

There are only 2 changes to core, marked with the CHANGED text:

1) Add directories for additional profiles specified in bundles
2) Use ALL modules from scan instead of just enabled modules.

Comments

  • mpotter committed b6b1723 on 8.x-3.x
    Issue #2532452: Refactor FeaturesInstallStorage
    
mpotter’s picture

Status: Active » Fixed
StatusFileSize
new5.22 KB

Committed to b6b1723, but here is the patch for those who want to review it.

mpotter’s picture

In the future, we should copy the latest code from core ExtensionInstallStorage and make our changes as indicated with the new CHANGED comments to avoid additional regressions.

mpotter’s picture

Also related f9847f8 commit that removes the old getAllModules() function.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.