Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently the composer_manager_build_json method doesn't combine the 'extra' key array from a composer.json file when executing 'drush composer-json-rebuild'. This key can be used to include information for the 'installer-paths' array used to define folder locations for drupal modules/themes, contrib or custom outside of the usual 'vendor' path, as outlined in https://www.drupal.org/docs/develop/using-composer/using-composer-to-man....
For full disclosure, the array would look as follows:
"extra": {
"installer-paths": {
"docroot/": ["type:drupal-core"],
"docroot/sites/all/libraries/{$name}": ["type:drupal-library"],
"docroot/sites/all/modules/contrib/{$name}": ["type:drupal-module"],
"docroot/profiles/contrib/{$name}": ["type:drupal-profile"],
"docroot/sites/all/themes/contrib/{$name}": ["type:drupal-theme"],
"drush/{$name}": ["type:drupal-drush"],
"docroot/sites/all/modules/custom/{$name}": ["type:drupal-custom-module"],
"docroot/sites/all/themes/custom/{$name}": ["type:drupal-custom-theme"]
}
},
Patch will be added shortly.
Edit - patch added.
Comment | File | Size | Author |
---|---|---|---|
#9 | interdiff-2876808-7-9.txt | 12.02 KB | markhalliwell |
#9 | 2876808-9.patch | 14.67 KB | markhalliwell |
Comments
Comment #2
paul.kim CreditAttribution: paul.kim commentedComment #3
paul.kim CreditAttribution: paul.kim commentedComment #4
kenorb CreditAttribution: kenorb commentedComment #5
kenorb CreditAttribution: kenorb commentedComment #6
markhalliwellThis needs a little love.
Comment #7
markhalliwellThis refactors things a bit so it can allow for any property to have its receive relative path fixed, which is needed for
patches
andpatches-ignore
in theextra
property.Comment #8
markhalliwellThis still needs a little bit of work. I'm working on a POC for #2947485: Depend on Composer, which will need to specify its own installer paths and patches.
Comment #9
markhalliwellComment #11
markhalliwell