Problem/Motivation
In the root composer.json file for drupal/drupal, there is a copy of the installer paths configuration for composer/installers:
"installer-paths": {
"core": ["type:drupal-core"],
"modules/contrib/{$name}": ["type:drupal-module"],
"profiles/contrib/{$name}": ["type:drupal-profile"],
"themes/contrib/{$name}": ["type:drupal-theme"],
"drush/contrib/{$name}": ["type:drupal-drush"],
"modules/custom/{$name}": ["type:drupal-custom-module"],
"themes/custom/{$name}": ["type:drupal-custom-theme"]
}
In contrast, the composer installer paths in composer/Template/LegacyProject/composer.json look like this:
"installer-paths": {
"core": ["type:drupal-core"],
"libraries/{$name}": ["type:drupal-library"],
"modules/contrib/{$name}": ["type:drupal-module"],
"profiles/contrib/{$name}": ["type:drupal-profile"],
"themes/contrib/{$name}": ["type:drupal-theme"],
"drush/Commands/contrib/{$name}": ["type:drupal-drush"]
}
The differences are:
- drupal/drupal is missing 'libraries', and has the old (early Drush 8) location for Drush extensions.
- drupal/legacy-project is missing the 'custom' paths, and has the correct location for Drush extensions.
n.b. Early versions of Drush 8 expected Drush extensions to be installed to drush/contrib
; Drush 9, on the other hand, need Drush extensions to be in drush/Commands/contrib
. Recent versions of Drush 8 (Drush 8.2.2+, March 2019) also accept the Drush 9 location.
Proposed resolution
- Update drush/drush to use the same path for Drush extensions as the template projects are using.
- Add libraries to drush/drush.
- Add custom paths to the template projects.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
The composer installer paths in drupal/drupal were unified with those in the template projects, drush/recommended-project and drush/legacy-project.
Comment | File | Size | Author |
---|---|---|---|
#2 | 3084298.patch | 2.72 KB | greg.1.anderson |
Comments
Comment #2
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedHere's a patch.
Comment #3
MixologicNice cleanup, and sensible consistency.
+1
Comment #4
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedUpdated issue summary to remove "change record" from remaining tasks. The specific installer paths in the new Composer template projects are not documented in their existing change record, and no one should use the drupal/drupal installer paths directly, most of the time, so we probably don't need a change record here.
Comment #5
larowlanCommitted 8d029c4 and pushed to 8.8.x. Thanks!