drupal-composer / preserve-paths

A composer plugin for keeping specified files and directories when installing/updating new composer packages. Can be used to supported nested packages.
28 stars 28 forks source link

Fix incompatibility with drupal/core-composer-scaffold #30

Closed leymannx closed 4 years ago

leymannx commented 4 years ago

Now that drupal-composer/drupal-scaffold mainly got replaced by drupal/core-composer-scaffold preserving paths doesn't work on scaffolding files anymore.

Steps to reproduce

  1. $ composer create-project drupal-composer/drupal-project:8.x-dev some-dir -n
  2. $ cd some-dir
  3. $ composer require drupal-composer/preserve-paths
  4. Add to extra:
    "preserve-paths": [
          "web/sites/example.settings.local.php"
    ]
  5. $ echo '$config[\'environment_indicator.indicator\'][\'bg_color\'] = \'#0066ff\';' >> web/sites/example.settings.local.php
  6. $ composer install -n

Expected result:

Actual result:

leymannx commented 4 years ago

Can anybody confirm this?

leymannx commented 4 years ago

Ah look, this can be overridden by configuring "drupal-scaffold" like following.

"drupal-scaffold": {
    "locations": {
        "web-root": "web/"
    },
    "file-mapping": {
        "[web-root]/sites/example.settings.local.php": false
    }
},

Should we still go on trying to fix it from this very plugin?

tobiasbaehr commented 4 years ago

In D8 you do not need this plugin anymore.