I’m having some questions about installing the latest drush, and the more I search, the more conflicting advice am I getting. I need both drush 8 and 10, since I am testing both Drupal 7 and 9. I had installed drush 8 a while back as a standalone in /usr/local/bin/drush8. But I can’t figure out how to create a similar standalone version of 10 (one that would be moved to /usr/local/bin/drush10). I’m using MACOS 12.3, symfony 4.4.35, PHP 7.4.12, drupal 9.3.9
From Google, answers seem to say to just got to the Drupal 9 installation root and use composer require drush/drush, while drupalize.me says to install it as a dev dependency with composer require –dev drush/drush (is using a dev a good idea?). When I try doing this, it is trying to install drush 11. Should I be using 11 instead of 10? I tried using composer require "drush/drush: ^10.6.2"
and got a bunch of errors, so using 11 sounds good to me.
https://webchick.net/drush-and-drush has instructions, but I can’t get it to work; for one thing, she says to download the release 8.4.1’s drush.phar file, with isn’t in the repo.
Anyway, I do have 8 working ok, and now would like to be able to use 11 (or 10) for Drupal 9 testing. Can it be installed in a global location like /usr/local/bin, or is tied to each Drupal installation?