Active
Project:
Composer
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
17 May 2012 at 06:29 UTC
Updated:
1 Mar 2013 at 16:29 UTC
I've spent some time today trying to wrap my head around Composer, and it seems like it would be really useful if there were a more Drupally target for installed composer libraries. I.e., for Drupal 6 and 7 could we do something to have Composer drop off libraries in sites/all/libraries?
According to this handy custom installers page, there is some basis to think it's possible, though it looks like it may be a per-package configuration.
Comments
Comment #1
robloachSounds pretty neat! Definitely something to consider.
Comment #2
robloachHmmm, Drupal Composer Installer....
mycustommodule/composer.json
myothermodule/composer.json
If you run "drush composer install" on mycustommodule, it will download myothermodule to sites/all/modules/myothermodule. Innnteresting.
Comment #3
bastnic commented@Rob Loach: just to say that you rock!
I was planning to develop exactly that Composer Installer so I'm very pleased that I did not have to. Thanks.
Comment #4
robloachIt's probably very broken! Didn't really test it much...I do accept pull requests though! :-)
Comment #5
Grayside commentedAwesome! Super excited that you jumped on this. I hope to find time to help out...
Here's a couple quick thoughts/requests that I'll try to follow up on...
Comment #6
patcon commentedThis is SO awesome. I hope I have more time to look into custom installers...
Comment #7
Grayside commentedDid a bit of exploration. Finding it tricky to wrap my head around this. I think my (limited) understanding of Composer is battling my understanding of drush make.
Spent some time looking at how to treat drupalcode.org as a package repository (maybe it's a modified Git driver?).
Comment #8
robloachAh, interesting... GitHubDriver looks pretty neat.
Comment #9
Grayside commentedAnd as long as we're brainstorming random ways to trick out Composer, the downloader architecture looks like we could shell out to drush. This would be nice, as the logic of good default code versions and where to save the file on disk could be left to the existing logic in drush pm-download.
Comment #10
patcon commentedDid I mention that I really really like this conversation? :)
Should we turn this into a meta-issue to discuss potential ways to use Composer, then talk about creating some coherent sub-issues to investigate and experiment and report back? Do you guys mind that approach?
I'm going to change it, but feel free to flip it back
As for another idea, was reading through the docs and came across the type called metapackage:
https://github.com/composer/composer/pull/258
https://help.ubuntu.com/community/MetaPackages
Sounds like it might be a good candidate to take the place of drush makefiles.
https://gist.github.com/2815829
So it seems like so far we've got a few ideas floating in here:
Comment #11
patcon commentedAlso, have been confused by the apparent lack of recursive resolution, but seems it's actually just that "right now –- and probably always –- composer does not resolve repositories recursively, it only does for dependencies available in packagist.org."
Might be worth monitoring that, as it means Composer can't recurse through any projects we self-host. In the current scheme, packagist.org would need to be our central hub in order for composer to be a true successor to drush make...
Comment #12
patcon commentedtagging
Comment #13
Grayside commented@patcon the software running packagist.org is open source, and either that or a lightweight version is already up at http://packages.drupalbin.com/.
This implies that while recursive dependencies cannot currently be supported, we do have code available to see how they handle it, and contemplate the path toward the landslide shift of cooking composer into Drupal. After all, what are .info files?
I agree, this issue has spun off into meta-land. :)
Comment #14
Grayside commentedBy way of @cell, https://github.com/shama/baton.
Comment #15
robloachWould be great to port the Drupal Root detection over to http://github.com/composer/installers .
Comment #16
patcon commentedI think this would be undesirable for people interested in using composer.json files for their install profiles in the interim, right?