Drupal Association members fund grants that make connections all over the world.
Goal → MVP
As a distribution profile author, I'm easily able to inform the installer that only my distribution profile is to be installed, so that (1) I do not have to fork Drupal and so that (2) downloading my distribution package from drupal.org makes any sense in the first place.
As a distribution profile author, I can control the entire installer experience, including the theme, starting from the very first installer screen, so that I can tailor my product for the target audience.
As a distribution profile developer, I do not have to resemble or depend on any drupal.org specific release packaging script mechanics (that may or may not happen in ~2018), so that I can simply
git clonemy project repository + rock on.
Distribution installation profiles
Beautiful simplicity in
distribution: name: Portfolio install: theme: bartik
'distribution'info file property is optional and not required. → If no installation profile specifies it, then the installer operates as usual: Regular Drupal installer, regular profile selection, etc.
'distribution'info file property denotes that an installation profile is a distribution, which takes over the installer. → By definition, if you install with a profile that defines a distribution name then you are no longer installing "Drupal".
Logical reverse condition: If you no longer install Drupal, then any installation profile, whose distribution name is not "Drupal", is hence (1) a distribution and (2) to be treated exclusively.
Next to the distribution name, a distribution profile can override additional installer environment parameters, such as the theme.
Note: The goal of this patch is to establish the basic architectural functionality. Only the installer theme can be set at this point. The info file definition format is intentionally prepared to allow for other overrides. Further installer settings (langcode, translation server, etc) can be easily added and implemented in separate follow-up issues at any time (even after 8.0.0). There might also be use-cases for non-installer parameters, hence the nested
'install'key. Any additional settings should not be added prematurely; they should be based on actual distribution author feedback.
$ cd profiles $ git clone --branch 8.x-1.x http://git.drupal.org/project/portfolio.git
→ Just hit the installer.
'exclusive'(Boolean) flag and the optional
'distribution_name'property in installation profile .info.yml files have been replaced with the
distribution_name = Commerce Kickstart exclusive = 1
distribution: name: Commerce Kickstart
install.php?profile=URL query parameter can still be used to manually override the automatically preselected installation profile.
The behavior of the installer when multiple exclusive/distribution profiles are discovered has been changed:
- In Drupal 7, if the installer discovered multiple
'exclusive'profiles, then no profile was preselected.
- In Drupal 8, if the installer discovers multiple
'distribution'profiles, then the first discovered is preselected and others are ignored.
- In Drupal 7, if the installer discovered multiple
Distribution installation profiles are now able to override further aspects of the installer environment:
distribution: name: Commerce Kickstart install: # Theme to use in the installer. theme: commerce_kickstart_admin
Distribution installation profiles now fully participate in the entire early installer environment (as if they would be a regular module).
This means that the installation profile can implement any kind of module hook.
This work is not to be mistaken with installation profile inheritance à la base themes.
Support for multiple installation profiles in a distribution is a separate and different feature request.
This came up inwith the code suggestion I'm going to post soon (assuming that one gets committed) and in to make it possible for distros to make changes to the installer before they are selected.
1. It was always an issue for distros to pre-select themselves, effectively skipping the install profile selection page. There are various tricks Open Atrium and other distros used to overcome this and skip the profile selector by redirecting the user in the installer.
2. moved the language selector before the profile selector so it removed the possibility for profiles to affect the language (either pre-select it or alter the language selection screen). This then becomes an equivalent problem of the profile acting before it is selected.
3. There is an existing distro name .info file property that is effective once the profile is selected. The language step move makes the drupal naming/branding appear a bit longer, so it would be ideal to migrate this setting to a distro level setting that is effective right from the first screen.
4. The installer theme issue at suggests we introduce a distinct brand in the installer that would need to be alterable for serious profiles again before the profile is selected.
All these call for distro level configuration which would act before the profile would be selected for distros which serve one clear purpose, such as Open Atrium, COD and many others. Profiles that have a clear idea of how the language selection screen should look or what theme the installer should use, etc. would presumably ship with one custom install profile that could provide these details. So the need for for conflict resolution, when multiple profiles specify custom themes or ask for themselves to be the selected profile is minimal IMHO. We can just use the values from the first profile we found to specified them in the file system.
Patch #29 adds the ability to have a file in
profiles/distribution.php with settings on it that will pre-select options for
With this patch, the installation should work as normal by default, no installation tasks should disappear from the task list when going through it manually.
To test the distribution settings, create a file at
profiles/distribution.php with the folliwing:
$settings['theme'] = 'stark';
- You should see that the installation theme changes to stark.
$settings['parameters']['profile'] = 'standard';
- With this file, the installation process will use the 'standard' profile and it won't ask or show the profile settings during an interactive install.
$settings['parameters']['langcode'] = 'en';
- With this file, the language will be set to ('en') (try other languages also) and the language selection task will not be part of the list of tasks for an interactive installation.
- More tests: ( got in, and an example is in )
- #29 in
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 65,281 pass(es). View
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 65,354 pass(es). View
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 65,107 pass(es). View