I'm trying to install drush 8 via composer:
composer global require drush/drush:dev-master (source)
but it gives me drush version 7.0.0 which is without D8 integration... I'm using Linux Mint 17.
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
composer require drush/drush:dev-master gave me Drush 8 three days ago when I ran this tutorial to setup different versions of Drush on my system http://www.jpstacey.info/blog/2014-04-07/switching-between-drush-major-versions
Multiple versions of Drush can be useful if a site is no longer in development and for example custom drush commands were created for a specific version of Drush.
I also find that
composer require drush/drush:dev-master (n.b. deliberate removal of
global option), ran in a directory without a composer.json file did in fact pull down the 'master' branch of Drush, which is Drush 8, just as the documentation says. As an experiment, you might want to try running the same command (without
global) in an empty directory, and see if you get the right version of Drush in that instance.
If that is working for you, then perhaps you have an older version of Drush in your global vendor directory ($HOME/.composer/vendor/drush/drush). It is possible that Composer might become confused by this, as 'dev-master' did at one time refer to the 7.x branch. I did not attempt to reproduce this situation, and tend to think that in most cases you should still get the 'master' branch. However, if you are having trouble, you might try
composer global remove drush/drush, and then re-install as you did before, and see if this fixes the problem. You might also try
composer self-update, in case you have an old composer.
export PATH="$HOME/.composer/vendor/bin:$PATH" source $HOME/.bashrc composer global require drush/drush:8.x