mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Fatal error when attempting to run generate-proxies #7117
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dflinn2002 on GitHub (Mar 9, 2023).
Bug Report
Doctrine DBAL v3.6.1 is returning an error for an improper 'driverClass' when being run in PHP8.1.
Summary
I'm attempting to create proxy files for Doctrine using the command:
php ./vendor/bin/doctrine-module orm:generate-proxies --em=orm_database, but this triggers the issue:Fatal error: Uncaught Doctrine\DBAL\Exception: The given 'driverClass' Doctrine\DBAL\Driver\PDOSqlite\Driver has to implement the Doctrine\DBAL\Driver interface. in /usr/local/solution/vendor/doctrine/dbal/src/Exception.php:98Expected behaviour
The proxy files should be able to generate without any issue.
@creative-inquiry commented on GitHub (Jan 31, 2024):
Does anyone have any ideas on this one?
Much appreciated.
P.S. I was able to address this by following https://stackoverflow.com/questions/77052713/error-with-doctrine-and-laminas-driverclass-has-to-implement-the-doctrine-dbal
I.e. the change was
Doctrine\DBAL\Driver\PDOMySql\Driver::class=>Doctrine\DBAL\Driver\PDO\MySQL\Driver::class