Problem/Motivation

Drupal has a quirk where, when you use an install profile (and you almost always do), it gets "installed" as if it were a module, and becomes an installed extension, treated like a module. This is strange, because most of the time, install profiles have nothing to actually do with normal site operation. They just sit there for no reason.

The exception is traditional distributions, which may very well need the profile to stick around in order to lock down certain functionality or do updates. That fits the "this is a locked-in product" model of a traditional distribution. But most of the time, why keep the install profile?

Proposed resolution

Since Drupal 10.3, install profiles have been able to be uninstalled, no problem, like normal modules.

So I propose that, as part of finalizing the install process, the installer:

  1. Validate that the profile can be uninstalled.
  2. If it can be...then silently uninstall it.

This should NOT happen the profile has the distribution key in its info file. The assumption there is that it wants to do distribution-ey things, and therefore might need its install profile. Changing the scope and capabilities of the distribution element is a task for another time.

If the profile is not marked as a distribution, but also cannot be uninstalled due to validation errors, then just leave the profile installed, logging a warning (or maybe an error) with the reasons why the uninstall could not be done.

Remaining tasks

Get framework and release manager buy-in, then implement it with tests.

User interface changes

None.

API changes

Not really an API change, but it would change the default behavior of the installer.

Release notes snippet

TBD

Comments

phenaproxima created an issue. See original summary.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

phenaproxima’s picture

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.