Using D9 with Drush 10. MacOS/MAMP Pro.
Drush 10 is installed locally using composer and is starting fine and finding the database. sqlc works fine. (I have other Drupal sites that are working just fine with their composer drush, though they are Drupal 8)
The problem seems to be the php binary/config drush is using. In drush status I see:
PHP binary: /usr/bin/php
PHP config: /etc/php.ini
The PHP doesn’t match what I see in terminal, it should use the MAMP PHP:
which php: php: aliased to /Applications/MAMP/bin/php/php7.4.2/bin/php -c "/Library/Application Support/appsolute/MAMP PRO/conf/php7.4.2.ini"
php -v PHP 7.4.2 (cli) (built: Feb 17 2020 12:56:02) ( NTS )
I also have export DRUSH_PHP=/Applications/MAMP/bin/php/php7.4.2/bin/php
I can’t think of what other config would be affecting which php drush is using… Any help would be appreciated.