Provides config and drush commands for applying the Phapp environment mode variable.
- A phapp-cli enabled project.
- A working dotenv setup that loads PHAPP environment variables, as existing in drunomics/drupal-project
In drunomics/drupal-project, all setup steps are taken care already. For others:
Add the following to settings.php:
// Set active split configuration. $split = getenv('PHAPP_ENV_MODE'); $config['config_split.config_split.' . $split]['status'] = TRUE;
Export some config split configuration that will set further config per environment in your config sync directory, name the split like the environment mode, "development", or "production".
You may use drunomics/dsk-config-split for creating suiting config.
phapp:apply-env-modeduring deployments right before