Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293938

Allow install profiles to require modules

$
0
0

Problem/Motivation

In an install profile's .info.yml file the dependencies behaves differently than a module's key of the same name. For an install profile it is a list of modules to install when the install profile is installed and not a dependency of the install profile. This means that the modules listed here can be uninstalled. For example, if you use the Standard install profile you can still uninstall the Contact module.

This works great for starter kit install profiles but creates problems for distributions that want to be more than that as every upgrade hook they write has to contend with the fact that the the ground has completely shifted from underneath them.

Proposed resolution

Add a new key to install profile's info.yml files: install. This key is a list of modules to install but the install profile does not depend on them. If the install profile also has a dependencies key then these are treated as real dependencies that can not be uninstalled because the install profile is required.

Since we don't want to affect existing install profiles unless they opt in we need a BC layer. The BC layer moves all an install profile dependencies to the install key if the install key is not set.

An advantage of this new approach is that the install profile special casing in ModuleInstaller and ModulesUninstallForm has been removed.

This is a different issue from #820054: Add support for recommends[] and fix install profile dependency special casing because I think the recommends key is something different than the list of modules that should be installed when installing an install profile.

Remaining tasks

  • Write a change record
  • Find documentation on drupal.org that will need updating
  • Find documentation in codebase that will need updating.

User interface changes

None

API changes

New key for install profile's to use in their info.yml file

Data model changes

None


Viewing all articles
Browse latest Browse all 293938

Trending Articles