Document the reason why recipes donโ€™t import a moduleโ€™s config entities by default

Created on 13 June 2024, 6 months ago
Updated 14 August 2024, 4 months ago

Problem/Motivation

From:
https://drupal.slack.com/archives/C2THUBAVA/p1718230991785469

Steps to reproduce

N/A

Proposed resolution

Documents the reasoning.

Ideas:

Alex Pott:
The reason why it is the way around it is it to ensure most choices in a recipe are intentional by default - saying just install all the config entities provided by a module is giving the module the chance to reconfigure the recipe. We prioritised empowering recipe builders.
Also FWIW it is not so easy to prevent config entity delete from an API perspective. And also the config importer does not work so different. Your module has to be able to run its code without any config entities it provides because all simple config and modules are enabled before any config entities are touched by the config importer.

Phenaproxima:
Here is what I propose: we should offer better guidance in documentation. We can surely say something like this:
Your recipe MUST explicitly say what it wants to do with the config of each module it's installing. You can do three things:
- Just import all the module's config, exactly like would happen if you installed the module through the UI.
- Import none of the config.
- Import some of the config, and list it explicitly.

It's also worth pointing out that any config actions run after any module config is imported, so config actions are able to modify any existing config, including any that was imported by the recipe.

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

Fixed

Version

1.0

Component

Documentation

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States thejimbirch Cape Cod, Massachusetts

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024