Hello I am struggling to solve this error for hours now, I have working website originally build with Zend version2, and migrated to Laminas MVC on PHP7.2. Everything was fine with Doctrine module and etc. Now we are upgrading to PHP8.2.
This line in controller factory started throwing error, and says “DoctrineModule\Cache\LaminasStorageCache::__construct(): Argument #1 ($storage) must be of type Laminas\Cache\Storage\StorageInterface, string given, called in /pojectpath/vendor/doctrine/doctrine-module/src/Service/CacheFactory.php on line 63”
somehow I could solve it so let me share my issues.
I have several issues layered underneath,
1 : I had to change config/local or global.php, udpate strucrure of cache and FilesystemCache.
2 : added more dependencies. here is my latest composer.json
3 : Then I got new error says “The given ‘driverClass’ Doctrine\DBAL\Driver\PDOMySql\Driver has to implement the Doctrine\DBAL\Driver interface”. Then I realize, DBAL path is changed. I had it
Sorry for making mess. I thought I had solve issues but I guess I didn’t. Not sure how and why but it works fine on locally, but on server, I get error says
“vendor/laminas/laminas-servicemanager/src/ServiceManager.php:649”
“Service with name “doctrine.connection.orm_default” could not be created. Reason: The given ‘driverClass’ Doctrine\DBAL\Driver\PDOMySql\Driver has to implement the Doctrine\DBAL\Driver interface”
and this is the driver in config/local.php