A recurring theme within the folks working on the drupal scaffold is how to handle files that should be installed by composer, but then allow local changes to be made by the site that is using it as a template. https://www.drupal.org/project/drupal/issues/3092563
They added the `"overwrite": false attribute for file-mappings using the default/replace mode, so changes will not get overwritten after the first time the file is installed. However, the problem is that flag was not added as on option for file-mappings using the append mode. https://www.drupal.org/node/3086401
We are using appending for the settings.php file, since we want to add our code to whatever the original setting.php file is in the pantheon-systems/drupal-integrations repository. However, we only want that to happen once and not get overwritten.
In the meantime, I think I am going to append a note to the settings.php file warning that changes will be overwritten unless they disable the file-mapping in composer.json.
A recurring theme within the folks working on the drupal scaffold is how to handle files that should be installed by composer, but then allow local changes to be made by the site that is using it as a template. https://www.drupal.org/project/drupal/issues/3092563
They added the `"overwrite": false attribute for file-mappings using the default/replace mode, so changes will not get overwritten after the first time the file is installed. However, the problem is that flag was not added as on option for file-mappings using the append mode. https://www.drupal.org/node/3086401
We are using appending for the settings.php file, since we want to add our code to whatever the original setting.php file is in the
pantheon-systems/drupal-integrations
repository. However, we only want that to happen once and not get overwritten.Here is the thread where the drupal-scaffold maintainers are discussing this specific issue, and a patch may be available: https://www.drupal.org/project/drupal/issues/3095214
In the meantime, I think I am going to append a note to the settings.php file warning that changes will be overwritten unless they disable the file-mapping in composer.json.