When trying to run a migration I get the error Artisan migration
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Doctrine\DBAL\Driver\PDOMySql\Driver' not found
i already installed doctrine/dbal using
composer require doctrine/dbal
and on my composer.json already had
doctrine/dbal": "^3.0"
but i still got this error
This new version is having this issue. a workaround for that can be:
"doctrine/dbal": "^2.12.1"
in composer.json filecomposer 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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With