Fatal error when attempting to run generate-proxies #7117

Open
opened 2026-01-22 15:45:05 +01:00 by admin · 1 comment
Owner

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:98

Expected behaviour

The proxy files should be able to generate without any issue.

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:98` #### Expected behaviour The proxy files should be able to generate without any issue.
Author
Owner

@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

@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`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#7117