Skip to main content
Ungathered Thoughts

Which Drupal config split is currently active

This information is also shown at admin/config/development/configuration/config-split. I have to figure this one out periodically for CLI debugging, so here's a note.

$environments = [
  'development',
  'ci',
  'staging',
  'uat',
  'production',
];
foreach ($environments as $environment) {
  if (\Drupal::config("config_split.config_split.$environment")->get('status')) {
    print "$environment";
  }
}