drush-ops/drush — pull request #1031 by tstoeckler (2014-12-03 11:53:12+00:00)
Title: Allow to pass an autoloader into drush_drupal_load_autoloader()

When working with a Composer project where both Drush and Drupal are in the same autoloader including Drupal's `core/vendor/autoload.php` fails because `core/lib/Drupal.php` has already been included by Drush's autoloader at this point and Drupal's autoloader tries to include it again.

If `drush_drupal_load_autoloader()` allowed to pass in an autoloader from the outside (i.e. in a site-specific `drushrc.php`) this could be avoided.

Thus, this commit does just that. With this I am able to successfully run `drush site-install` given https://github.com/drush-ops/drush/pull/1030 and https://www.drupal.org/node/2386247 (and an adjustment to Drush the latter one requires).