---
title: "PHP version mismatch with Drush"
date: "2023-09-29T17:12:23+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/93271-php-version-mismatch-drush"
id: "96fb2e03-84b7-4ea6-9d14-2ace2b98c50a"
---

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. 

    composer require drush/drush --update-with-all-dependencies

  
To verify your PHP version run the following command

    $ php -v
    PHP 8.1.12 (cli) (built: Nov 17 2022 08:00:49) (NTS)
    Copyright (c) The PHP Group
    Zend Engine v4.1.12, Copyright (c) Zend Technologies