Thanks in advance for any effort at all on this. :-)
I use composer-installers to put Drupal stuff where it belongs. See my minimal composer.json below for an example of how this works.
Using Composer 1, this works as expected: Drupal core is placed in docroot/ without any problem.
Using Composer 2, everything works as expected again, except for one extra bit of path is inserted to docroot/sites/sites/. It should only be docroot/sites/.
This doesn't make a lot of sense because the whole package should just be placed within the custom directory. This is the only directory that has any special cases... Other directories within drupal/drupal are not misplaced.
This issue only happens with custom path configurations for both drupal-core and drupal-module. I would expect that if there were a problem, it would be with one overwriting the other, not adding a bonus directory.
% composer show composer/installers | grep versions
versions : * v1.10.0
% composer --version
Composer version 2.0.11 2021-02-24 14:57:23
composer.json:
{
"name": "foo/bar",
"type": "project",
"config": {
"sort-packages": true,
"platform": {
"php": "7.3"
}
},
"require": {
"composer/installers": "@stable",
"drupal/ctools": "1.17",
"drupal/drupal": "7.78"
},
"extra": {
"installer-paths": {
"docroot": [
"type:drupal-core"
],
"docroot/sites/all/modules/contrib/{$name}": [
"type:drupal-module"
]
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/7"
}
}
}
Thanks in advance for any effort at all on this. :-)
I use composer-installers to put Drupal stuff where it belongs. See my minimal composer.json below for an example of how this works.
Using Composer 1, this works as expected: Drupal core is placed in docroot/ without any problem.
Using Composer 2, everything works as expected again, except for one extra bit of path is inserted to docroot/sites/sites/. It should only be docroot/sites/.
This doesn't make a lot of sense because the whole package should just be placed within the custom directory. This is the only directory that has any special cases... Other directories within drupal/drupal are not misplaced.
This issue only happens with custom path configurations for both drupal-core and drupal-module. I would expect that if there were a problem, it would be with one overwriting the other, not adding a bonus directory.
composer.json: