Drupal is a registered trademark of Dries Buytaert
Release: Drupal 10.3.6 Update released for Drupal core (10.3.6)! Release: Drupal 11.0.5 Update released for Drupal core (11.0.5)! Release: Drupal 10.2.9 Update released for Drupal core (10.2.9)! Release: Drupal 10.2.10 Update released for Drupal core (10.2.10)! Release: Drupal 10.3.7 Update released for Drupal core (10.3.7)! Release: Drupal 11.0.6 Update released for Drupal core (11.0.6)! Release: Drupal 10.3.8 Update released for Drupal core (10.3.8)! Release: Drupal 11.0.7 Update released for Drupal core (11.0.7)! Module Revived: Translation Management Tool 8.x-1.19 Module tmgmt updated after 7 months of inactivity (8.x-1.19). Usage Milestone: Account field split Module account_field_split crossed 10,000 active installs.

This module allows other modules to define changes to installable configuration
in a config/modify folder.

Usage

This module will try to apply modifications whenever Drupal core would install optional config.

Modification Format

Modifications are defined in YAML files in the config/modify folder of your
module. Files must be named <module>.<unique>.yml where <module> matches the
name of your module and <unique> is a unique string (e.g. add_search_field).

The files contain two top-level keys: dependencies and items. The contents
of dependencies matches Drupal core's config dependency format. items should
contain a list of named config items using the Config Update Definition format
from the update_helper module.

All configuration keys under items are implicit config dependencies, providing
for atomic updates.

For example to add an article field to a search index:

dependencies:
  config:
    - field.field.node.article.body
items:
  search_api.index.my_search:
    expected_config: { }
    add:
      field_settings:
        article_body:
          label: Article Contents
          datasource_id: 'entity:node'
          property_path: body
          type: text
          dependencies:
            config: field.field.node.article.body

The above file will automatically add an article_body field to the my_search
index when the search index exists and the body field exists on the article
node type. If the search index or the field does not exist it will do nothing.

Limitations

We currently must overwrite the ConfigInstall class because it doesn't provide a proper hook to run after optional config is updated.

Similarly we must overwrite the update_helper's Updater class because it doesn't allow executing a CUD without loading it from config/update.

If we can solve those two issues then we can simplify our code quite a bit.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Sep 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Dormant

Releases

Version Type Core Release date
1.2.0 Stable Sep 30, 2024
1.1.2 Stable Sep 30, 2024