Composer Manager does not respect $conf['composer_manager_vendor_dir'] from settings.php on install. This is due to variable_set in the composer_manager_install() function at time of install.
To reproduce:
- Create a fresh Drupal install.
- Add the following to settings.php:
$site_dir = basename(__DIR__);
$conf['composer_manager_vendor_dir'] = '../lib/' . $site_dir . '/vendor';
$conf['composer_manager_file_dir'] = '../lib/' . $site_dir;
- Add a small custom module per https://www.acquia.com/blog/using-composer-manager-get-island-now
- Install the custom module with drush or from the Drupal admin.
- Review the composer_manager-generated composer.json file, which is pointing to 'sites/all/vendor'.
Note, this is only an issue in 7.x-1.x. The hard-coded variable_set has been removed from the 7.x-2.x version.
Comments
Comment #1
n8nl CreditAttribution: n8nl commentedPatch attached. This will respect composer_manager_vendor_dir from settings.php $conf.
Comment #2
n8nl CreditAttribution: n8nl commentedComment #3
cpliakas CreditAttribution: cpliakas commentedGreat catch! Thanks for the contribution.
Comment #5
cpliakas CreditAttribution: cpliakas commentedComment #6
n8nl CreditAttribution: n8nl commentedWhoops! Looks like my previous patch caused the install file to go into the ether. New patch attached in case you're able to roll back and re-apply.
Comment #7
n8nl CreditAttribution: n8nl commentedAnd another in case you're not able to roll back.
Comment #8
bojanz CreditAttribution: bojanz commentedCommitted #7, thanks.