-
Notifications
You must be signed in to change notification settings - Fork 117
Ability to Inject Drupal 8 Config Values into Settings.php #2
Comments
We can switch this around to support better pathing. Possible examples could include: /sites/default/files/config/[ENVIRONMENT]-active The reason to move these directories is to allow this configuration to be managed by git and magiced through our workflow tools. |
We will need to make sure that these do not get squashed if someone pushed up custom items in settings.php (i.e. local developers). |
Here is the logic we are using for now. Will need to be updated with correct paths which ideally would be pushed in through PRESSFLOW_SETTINGS: // Load CMI directory config, if present.
if (isset($_SERVER['PRESSFLOW_SETTINGS'])) {
$config_directories = array(
CONFIG_ACTIVE_DIRECTORY => array(
'path' => 'config_active',
),
CONFIG_STAGING_DIRECTORY => array(
'path' => 'config_staging',
),
);
} |
…drupal_settings_initialize() instead of _drupal_request_initialize()
This logic has been moved to settings.php for the time being |
Found this issue while googling for https://drupal.org/node/1830816. |
Since the CMI active configuration is now in the database, we can simplify this a bit. |
…tings.php (Avoiding Check in Install)
I also added a quick workaround so this directory is actually sites/default/files during installation so the write-ability check passes. You will still need to make the configuration writeable to use CMI, but it wont bust install. |
As a quick note, it probably is best to have the configuration settings happen in settings.php WITHOUT a wrapper for running on Pantheon so folks who move elsewhere or have a local development setup still are able to find where their configuration lives. |
We should also add a message that describes the privacy settings of these values and consider moving it to /private so it is private + versionable on Pantheon. |
I would propose the following note about privacy and config paths:
|
Everything mentioned here has been committed. |
Changes to improve ease of use & maintenance found during user testing
Unlike the installation process for Drupal 7, Drupal 8 requires (on behalf of CMI) that the values for the configuration directories be available to settings.php. This is typically written during installation and look like this:
$config_directories['active']['path'] = 'config_1-lRVHZQPcBvES1GZkcB4OMzcH9qHNiqTxhEj706e3U/active';
$config_directories['staging']['path'] = 'config_1-lRVHZQPcBvES1GZkcB4OMzcH9qHNiqTxhEj706e3U/staging';
Since we want to skip this step all together, we will need to figure out how to modify this write/read behavior so that Pantheon can define the $config_directories values in the same way we currently do for the $databases.
The text was updated successfully, but these errors were encountered: