I’m struggling with Doctrine ORM. I’ve added the modules and created config part for doctrine. I’ve made an entity with some ORM annotations and now I want to update the entities, so I try to run:
Fatal error: Uncaught Laminas\Di\Exception\MissingPropertyException: Could not resolve value for parameter “storage” of type Laminas\Cache\Storage\StorageInterface in class DoctrineModule\Cache\LaminasStorageCache (requested as Doct
rineModule\Cache\LaminasStorageCache) in C:\Users\sfra\Documents\Prive\wamp\vhosts\laminasmodules\vendor\laminas\laminas-di\src\Resolver\DependencyResolver.php:323
Somethign to do with the cache. This is my doctrine config:
I was suggested to use cli-config.php and bootstrap the application, but that file is not being called in this script. It is in another Doctrine script.
The Laminas prefix is needed, because the module has that namespace
I removed the custom cache and corrected the psr-4 autoloading. Now its working. Going to look at “migrations” in doctrine to get the updates to the different stages of the DTAP cycle.
With regard to coding standards and PSR autoloading, the naming of the module still looks somewhat unconventional. When it comes to autoloading, Laminas and Composer specify what the namespacing should look like. Working with a “Laminas” prefix means that the module is an official Laminas module, which it is not. Kinda misleading. A single module should have exactly one psr-4 autoload entry to avoid complexity and followup problems.
What about the following change in your composer.json …
With this single entry everything will be found. Well, that means that the namespacing of your module should change to Strivex\Model in your classes. Shouldn 't be a problem with the auto-replace function of your IDE.
Already solved it. There was a wrong path to the Strivex modules.
Already changes the namespace to Strivex/Laminas/… because the modules are for using in a Laminas application
Doctrine is working now. Now looking for a nice and clean way to handle upgrades (prob. using Migrations) in the future. For now a manual sync is working during this stage.