We manage a bunch of Drupal 7 sites and a few Drupal 8 sites. I have been trying to workout the change to Drush 9 on the Drupal 8 sites and I have hit a roadblock.
For some reason when I try to use a local drush alias to contact the site it fails. If fails slightly differently for all the different contexts.
Locally, I have Drush 8.1.15 installed globally with composer, Drush 9.2.1 in my drupal site. I have a yaml alias and a php alias both local and remote.
On the dev server Drush 8.1.10 was installed with the phar download.
$ ./vendor/drush/drush/drush @project-client.dev st Missing argument 2 for Drush\Sql\SqlBase::__construct() SqlBase.php:34 [warning] #0 Drush\Drush::getContainer() called at [/mnt/www/project-client.dev.example.net/repo/vendor/drush/drush/src/Drush.php:193] #1 Drush\Drush::service(config) called at [/mnt/www/project-client.dev.example.net/repo/vendor/drush/drush/src/Drush.php:238] #2 Drush\Drush::config() called at [/mnt/www/project-client.dev.example.net/repo/vendor/drush/drush/src/Drush.php:274] #3 Drush\Drush::simulate() called at [/mnt/www/project-client.dev.example.net/repo/vendor/drush/drush/src/Sql/SqlBase.php:221] #4 Drush\Sql\SqlBase->query(SELECT 1;) called at [phar:///usr/local/bin/drush/includes/environment.inc:393] #5 drush_valid_db_credentials() called at [phar:///usr/local/bin/drush/lib/Drush/Boot/DrupalBoot.php:462] #6 Drush\Boot\DrupalBoot->bootstrap_drupal_database_validate() called at [phar:///usr/local/bin/drush/lib/Drush/Boot/DrupalBoot8.php:111] #7 Drush\Boot\DrupalBoot8->bootstrap_drupal_database_validate() called at [phar:///usr/local/bin/drush/includes/bootstrap.inc:430] #8 drush_bootstrap_validate(4) called at [phar:///usr/local/bin/drush/includes/bootstrap.inc:507] #9 drush_bootstrap_max() called at [phar:///usr/local/bin/drush/includes/bootstrap.inc:456] #10 drush_bootstrap_to_phase(-2) called at [phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php:59] #11 Drush\Boot\BaseBoot->bootstrap_and_dispatch() called at [phar:///usr/local/bin/drush/includes/preflight.inc:66] #12 drush_main() called at [phar:///usr/local/bin/drush/includes/startup.inc:458] #13 drush_run_main(, /, Phar detected. Proceeding to drush_main().) called at [phar:///usr/local/bin/drush/includes/startup.inc:365] #14 drush_startup(Array ( => /usr/local/bin/drush, => --alias-path=/Users/fanderson/.drush/sites, => --root=/var/www/project-client.dev.example.net/current/web/public, => --uri=project-client.dev.example.net, => st)) called at [phar:///usr/local/bin/drush/drush:114] #15 require(phar:///usr/local/bin/drush/drush) called at [/usr/local/bin/drush:10] PHP Fatal error: Declaration of Drush\Command\DrushInputAdapter::hasParameterOption() must be compatible with Symfony\Component\Console\Input\InputInterface::hasParameterOption($values, $onlyParams = false) in phar:///usr/local/bin/drush/lib/Drush/Command/DrushInputAdapter.php on line 27 Drush command terminated abnormally due to an unrecoverable error. [error] Error: Declaration of Drush\Command\DrushInputAdapter::hasParameterOption() must be compatible with Symfony\Component\Console\Input\InputInterface::hasParameterOption($values, $onlyParams = false) in phar:///usr/local/bin/drush/lib/Drush/Command/DrushInputAdapter.php, line 27 Connection to project-client.dev.example.net closed.
It looks to me as though it is attempting to run the global drush. How do I stop that? There are Drupal 7 sites on this dev server as well.