I have a question about adding drush for site-wide use thru the composer.json.

i added the latest version with composer "composer require drush/drush:dev-master".
after that i try to use drush in the docroot folder, but get an error:
Unable to load autoload.php. Run composer install to fetch dependencies and write this file (http://docs.drush.org/en/master/install-alternative/). Or if you prefer, use the drush.phar which already has dependencies included (http://docs.drush.org/en/master/install).

iam not shure it this depends on my server config, or on my way to add drush.

maybe someone can help me, please.

Comments

achikas created an issue. See original summary.

achikas’s picture

Assigned: Unassigned » achikas
Status: Active » Fixed

Ok, i solved it in two simple steps:

1. The autoload.php issue was based an a misconfigured php setting. after disable OpenBasedir it could be loaded.

2. To prevent to execute drush without the site path in the vendor folder i added the drush-launcher globally and it works great for me: https://github.com/drush-ops/drush-launcher

rajab natshah’s picture

Status: Fixed » Closed (fixed)