Updated: Comment #393
Problem/Motivation
With Drupal 7's vastly-improved install profile functionality, and the recently-improved drupal.org distribution packaging infrastructure, many new install profiles have been created, and they are awesome.
However, install profiles are not inheritable, so if you want to, say, take Drupal Commons, and base your site off of it, but add one or two extra modules in your own customized install profile, you have to clone the entire install profile and change it to your needs. Allowing install profiles to declare base profiles (just like themes can declare base themes) would drastically simplify customizations to existing distributions by:
- Inheriting configuration from a parent install profile (base-profile)
- Overriding specific configuration from the base-profile
- Inheriting customizations in the installer from the base-profile
- Having additional installer tasks and form items to customize their own "start-state"
Additional motivations are detailed on Dries's blog post.
Proposed resolution
- Modify the module load system to take into account base install profiles.
- Modify the install profile system to run parent installer(s) in the correct order.
- One proposed solution was to simply use modules instead of profile inheritance. This was discussedatlength and the prevailing attitude was that the functionality for profile inheritance has valuable use cases that cannot be solved by modules alone.
- An early resolution was to include a tag to exclude dependencies and themes. In an effort to clearly define focus for this patch, this functionality was removed from this patch. The use case for excluded_dependencies and excluded_themes is still very much valid, so this feature request has been given its own issue.
Remaining tasks
Create planWrite useful issue summary- Fix issue from #405
- Fix issue from #412
- Update Change Record.
- Make tests pass.
- Extensively test this patch against a real-world base-profile
- Add to existing documentation page (To be published only after patch is applied.)
- Review Documentation to make sure they are up-to-date.
User interface changes
None.
API changes
Install profiles can define base profiles using the syntax base profile: BASE_PROFILE
inside their .info.yml files.
Or, override dependencies from the base profile using the syntax:
base profile:
name: BASE_PROFILE
Related Issues
- For D7 patch tracking: #2067229: Allow install profiles to declare base profiles for Drupal 7
- For D8 info inheritance patch tracking: #2692403: Make info and configuration inheritable in profiles
- For D8 excluded_dependencies and excluded_themes: #2914389: Allow profiles to exclude dependencies of their parent