Config Split integration is not working as expected

Created on 18 July 2025, 5 days ago

Problem/Motivation

When Config Split is installed, we (attempt to) adapt the config transformer subscriber priorities so that Config Overlay runs both before and after Config Split.

We even have tests to cover this.

It does not work, however, when using drush cr. That is because we are relying on \Drupal::$container being set while building the new container (in order to figure out if Config Split is installed or not). When using drush cr that is never set before rebuilding the container so that Config Overlay incorrectly thinks Config Split is not installed, even if it is.

Steps to reproduce

  1. Use a stackable Config Split that splits off a module and expect that the shipped configuration will not be split of explicitly but will be detected during import.
  2. Use Drush to maintain the site, in particular run drush cr.
  3. Be disappointed.

Proposed resolution

Add back a service provider (which inherently has access to the new container being built and whether Config Split is installed for that one) and set the Config Overlay export priorities from there.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany tstoeckler Essen, Germany

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