Updated: Comment [#516]
Jump to page 2
Problem/Motivation
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.
Complications
Implementing this would expose or compound existing problems with the way distributions handle config. Specifically how distributions provide low level config bug fixes and new features to existing sites. #3004662: [META] Standardize the way distributions handle config updates was opened to see if we can get consensus around a solution.
Remaining tasks
Create planWrite useful issue summaryFix issue from #405Fix issue from #412Fix issue from #476Update 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.
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