Problem/Motivation

Provide a mechanism in core for handling configuration changes between different environments, such as Dev, Stage, Prod. For example, environments might have different modules enabled (e.g. Devel in Dev only, Acquia Connector in Prod only) and might have different configuration such as site name, SOLR server, API keys, etc.

Proposed resolution

  • Add new "Config Transform" events triggered by config import and export that allow event subscribers to modify the configuration being imported or exported.
  • Add new "Config Environment" core module that subscribes to the Config Transform events to provide environment-specific configuration.

Process and where to find it

This was proposed as a core feature in #2844681: Allow exported configuration to be environment-specific and adopted as part of the CMI 2.0 initiative #3008882: Roadmap for CMI 2.

Proposal roadmap

  1. #3047804: Add scaffolding for config_environment experimental module
  2. #3047812: Add a Config Transformation event dispatching during config import and export
  3. #3077504: Add config_exclude functionality to core
  4. #2991683: Move configuration transformation API in \Drupal\Core\Config namespace
  5. #3079029: Move module config exclusion from config_environment to core.services
  6. #3048860: Create Config Environment API
  7. #3048890: Add a UI to the Config Environment module
  8. #3046903: [discussion] Environment specific modules with updates.
  9. #3048873: Milestone: Move Config Environment module to beta
  10. #3048874: Milestone: Move Config Environment module to stable

Not in scope

  • Only one environment can be enabled at any given time. Does not implement the ability in Config Split of having multiple "splits" enabled.
  • Provides the config entity for an "environment" and service for managing environments, but does not solve all of the other myriad of environment use-cases provided by many different modules. Would allow those modules to potentially determine what environment is currently active on a site.
  • Initially only modules with simple config can be enabled in specific environments (Devel, etc) due to complexity with update hooks that could change config schema and do not run in modules not enabled for an environment.

Contributed projects

Comments

mpotter created an issue. See original summary.

mpotter’s picture

Issue summary: View changes
mpotter’s picture

Issue summary: View changes
mpotter’s picture

Issue summary: View changes
mpotter’s picture

Issue summary: View changes

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

mpotter’s picture

Issue summary: View changes
mpotter’s picture

Issue summary: View changes
mpotter’s picture

Issue summary: View changes
mpotter’s picture

Issue summary: View changes
mpotter’s picture

Issue summary: View changes
mpotter’s picture

Issue summary: View changes
mpotter’s picture

Issue summary: View changes
mpotter’s picture

Issue summary: View changes
mpotter’s picture

Issue summary: View changes
alexpott’s picture

Issue summary: View changes
alexpott’s picture

Issue summary: View changes
alexpott’s picture

Issue summary: View changes
alexpott’s picture

Issue summary: View changes
alexpott’s picture

alexpott’s picture

Issue summary: View changes
bircher’s picture

Issue summary: View changes
alexpott’s picture

Issue summary: View changes
mpotter’s picture

Issue summary: View changes
mpotter’s picture

Issue summary: View changes
bircher’s picture

Issue summary: View changes

Adding config_exclude issues and re-ordering the move of the core classes.

bircher’s picture

Issue summary: View changes

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

alexpott’s picture

Version: 8.9.x-dev » 9.1.x-dev

Discussed with @bircher. The current issue summary still reflects the required work. Moving 9.1.x as this is not the focus of 8.9.x or 9.0.x

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

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.