By wim leers on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.3.x
Introduced in version:
10.3.0
Issue links:
Description:
The install profile can now be uninstalled if the site does not depend on any module or theme in the profile directory. This is validated by InstallProfileUninstallValidator.
This means that it becomes possible for Drupal sites to be installed without using an install profile.
- Before
\Drupal::installProfile()can returnNULL(not yet installed) or a string value (the machine name of the install profile).core.extension:module: {} theme: {} profile: ''… and the
profilekey MUST exist.
- After
\Drupal::installProfile()can returnFALSE(no install profile),NULL(not yet installed) or a string value (the machine name of the install profile).-
- Default
core.extension:module: {} theme: {} profile: null… and the
profilekey MAY exist: if it's removed, that corresponds to\Drupal::installProfile() === FALSEi.e. no install profile. - Default
So, from a developer's perspective, there are only two things to be aware of:
\Drupal::installProfile()might return FALSE, meaning there is no install profile anymore.- The
core.extension:profileconfig key won't exist if the profile is gone.
Impacts:
Site builders, administrators, editors
Module developers
Site templates, recipes and distribution developers
Comments
Great, but how?
So here we have a way to detect if the profile exists and what is the name of the profile, if it does exists. But there is no explanation on how we actually remove the profile. Google only gives me D7 suggestions. Any ideas?
I was wondering the same!
I was wondering the same!
I removed the two references to the profile from the config file core.extension.yml then did a config import.
The profile is gone and no harm done!
You can remove the profile
You can remove the profile from
/admin/modules/uninstallpage.Let's Drupal
In blog you can see it in
In blog you can see it in action
https://www.drupal.org/blog/drupal-10-3-0