Change record status: 
Project: 
Introduced in branch: 
10.3.x
Introduced in version: 
10.3.0
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 return NULL (not yet installed) or a string value (the machine name of the install profile).
core.extension:
module: {}
theme: {}
profile: ''

… and the profile key MUST exist.

After
\Drupal::installProfile() can return FALSE (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 profile key MAY exist: if it's removed, that corresponds to \Drupal::installProfile() === FALSE i.e. no install profile.

So, from a developer's perspective, there are only two things to be aware of:

  1. \Drupal::installProfile() might return FALSE, meaning there is no install profile anymore.
  2. The core.extension:profile config key won't exist if the profile is gone.
Impacts: 
Site builders, administrators, editors
Module developers
Site templates, recipes and distribution developers

Comments

drupalviking’s picture

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?

finn lewis’s picture

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!

narendrar’s picture

You can remove the profile from /admin/modules/uninstallpage.

Let's Drupal

sarathkm’s picture

In blog you can see it in action
https://www.drupal.org/blog/drupal-10-3-0