artisan migration error “Class 'Doctrine\\DBAL\\Driver\\PDOMySql\\Driver' not found” artisan migration error “Class 'Doctrine\\DBAL\\Driver\\PDOMySql\\Driver' not found” laravel laravel

artisan migration error “Class 'Doctrine\\DBAL\\Driver\\PDOMySql\\Driver' not found”


This new version is having this issue.a workaround for that can be:

  1. change version to "doctrine/dbal": "^2.12.1" in composer.json file
  2. run composer update


"composer require doctrine/dbal ^2.12.1"

In updated versions of doctrine/dbl, Integration with PDO has been reworked. The php_pdo extension is no longer a hard dependency of the doctrine/dbal package. The PDO API is not longer the standard for DBAL APIs.

  • The following database platforms are no longer supported:( Drizzle, MariaDB 10.0 and older, Microsoft Azure, PostgreSQL 9.3 and older, SQL Anywhere, SQL Server 2008 and older.)

  • The following drivers are no longer supported:( pdo_ibm, sasql. )

  • Passing a PDO instance initialized outside of the DBAL is no longer supported.

Here is the reference document (https://github.com/doctrine/dbal/releases)