artisan migration error "Class 'Doctrine\\DBAL\\Driver\\PDOMySql\\Driver' not found", artisan migration error "Class 'Doctrine\\DBAL\\Driver\\PDOMySql\\Driver' not found", symfony symfony

artisan migration error "Class 'Doctrine\\DBAL\\Driver\\PDOMySql\\Driver' not found",


The doctrine/dbal dependency needs to be added to your composer.json

composer require doctrine/dbal

For more information check laravel #Modifying Columns


In my case both composer install and composer install was not working giving a same error “Class 'Doctrine\DBAL\Driver\PDOMySql\Driver' not found”,

The changes that i made to make this workable are given below

composer.json file changed

 "doctrine/dbal": "^3.0",

this changed with

"doctrine/dbal": "^2.0",

then run the command

composer update 


You have to downgrade the current version, this is what worked for me:

composer require doctrine/dbal:2.*