kalamuna / drupal-project

Kalamuna composer template for Drupal projects with CircleCI and Pantheon integration. (NOTE: THIS SHOULD NOT BE USED FOR NEW DRUPAL 9 SITES)
GNU General Public License v2.0
6 stars 1 forks source link

Drupal scaffold overwrites local changes when appending #85

Open mikemccaffrey opened 4 years ago

mikemccaffrey commented 4 years ago

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.