I have Drush 10.3.2-dev working on my system but I also need to work on an old project in Drupal 7, so I need Drush 7 to work on that particular project.
I downloaded Drush 7, unpacked it in a folder, drush
script is executable, but when I try to use it with ./drush
I get
Unable to load autoload.php. Drush now requires Composer in order to install its dependencies and autoload classes. Please see README.md
How can I use old Drush that is compatible with Drupal 7 in parallel with the newer version?
Edited to add:
I uninstalled drush with Composer globally, and when I try to execute the downloaded script it is reporting the old (8) version of drush, but when I change to the my Drupal project directory and execute the same script it gives me another drush version.
There is some clash of drush versions on my system and I don't know where it's coming from.
~/Downloads$ ./drush.phar --version
Drush Version : 8.4.10
/var/www/html/drupal$ ~/Downloads/drush.phar --version
Drush Commandline Tool 10.6.0
from another project I'm seeing yet another drush version:
/var/www/html/anotherProject$ ~/Downloads/drush.phar --version
Drush Commandline Tool 9.7.3
Do I need to uninstall Composerto make this work?
Another edit:
I think I might have found the issue, I have a /var/www/html/vendor
folder that shouldn't be there (because I have all projects in subfolders). When I rename that folder drush works properly, recognizes particular projects db info.