PHP version mismatch with Drush | Acquia Product Documentation
Cloud Platform
PHP version mismatch with Drush
PHP version mismatch with Drush
Date Published: September 29, 2023
Issue
When attempting to run drush command in your code base and encounter the following error.
$ drush status
Unable to load class Drush\Sql\Sql [error]
Error: Call to undefined method Symfony\Component\HttpFoundation\Response::create() in Drush\Boot\DrupalBoot8->terminate() (line 214 of /usr/local/drush8/vendor/drush/drush/lib/Drush/Boot/DrupalBoot8.php).
Drush command terminated abnormally due to an unrecoverable error. [error]
Resolution
There is a compatibility version mismatch between drush and PHP that needs to be corrected. To resolve this issue you need to install the correct version of drush with the PHP version you are on ex. if on PHP 8.x you must install drush 11.x via composer in your code base.