Composer can output information about what commands are available by running composer list --xml. We can use this info in the Drush wrapper.

php composer.phar list --xml > drush.composer.xml
CommentFileSizeAuthor
#1 xml.patch3.5 KBRobLoach
xml.patch62.67 KBRobLoach
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RobLoach’s picture

Status: Active » Needs review
FileSize
3.5 KB
Grayside’s picture

Are you intending the `drush.composer.xml` file to be committed to the repository or run manually?

Another possibility is to make it automatic, e.g., after `drush dl` completes, after `drush composer selfupdate` is run.

RobLoach’s picture

Status: Needs review » Needs work

Yeah, that's the general idea. Reading in the command list and options from drush.composer.xml means that we don't have to manually update them whenever they change. Just run a drush composer list --xml > drush.composer.xml every once in a while.

Having it generate it if it's not currently available is an interesting idea. Committing it directly to the repository seems the easiest to ensure it's readily available. For now, maybe we have it in the repository, and then later on evaluate auto-generating it when it's not available. Neat idea, Grayside :-) .

RobLoach’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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