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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

paul.kim created an issue. See original summary.

paul.kim’s picture

Issue summary: View changes
paul.kim’s picture

Issue summary: View changes
FileSize
364 bytes
kenorb’s picture

Status: Needs review » Reviewed & tested by the community
kenorb’s picture

markhalliwell’s picture

Assigned: Unassigned » markhalliwell
Status: Reviewed & tested by the community » Needs work

This needs a little love.

markhalliwell’s picture

Assigned: markhalliwell » Unassigned
Status: Needs work » Needs review
FileSize
8.59 KB

This refactors things a bit so it can allow for any property to have its receive relative path fixed, which is needed for patches and patches-ignore in the extra property.

markhalliwell’s picture

Title: composer_manager_build_json doesn't include 'extra' key array » Refactor composer_manager_build_json() to be more dynamic
Assigned: Unassigned » markhalliwell
Status: Needs review » Needs work
Related issues: +#2947485: Depend on Composer

This 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.

markhalliwell’s picture

Assigned: markhalliwell » Unassigned
Status: Needs work » Needs review
FileSize
14.67 KB
12.02 KB

  • markcarver committed 67f49b3 on 7.x-2.x
    Issue #2876808 by markcarver, paul.kim: Refactor...
markhalliwell’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.