I have recently updated my Laminas PHP solution to PHP8.1. Everything is working fine except that I'm unable to dynamically generate the proxy files during deployment using the latest version of Doctrine.
When I attempt to run php ./vendor/bin/doctrine-module orm:generate-proxies --em=orm_database
I am getting an error:
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
When I tried downgrading to an earlier package of Doctrine (2.13.9) based on answers to people having similar issues, it caused an issue with Symfony:
Fatal error: Uncaught Symfony\Component\Console\Exception\LogicException: An option named "em" already exists. in /usr/local/solution/vendor/symfony/console/Input/InputDefinition.php:232
Attempts to find an earlier Symfony package which works with the earlier Doctrine package has proven to be impossible.
Without being able to dynamically generate the proxy files, it makes adjusting the database schema (to add new columns) extremely difficult. Any suggestions would be welcome.