psr-container-doctrine
psr-container-doctrine copied to clipboard
Missing "class" config key on Laminas Mezzio
Hi! I'm facing some initialization problems with lib.
The exception that I receive is:
ServiceNotCreatedException
Service with name "doctrine.entity_manager.orm_default" could not be created. Reason: Missing "class" config key
My global config:
return array(
'doctrine' => [
'driver' => [
'orm_default' => [
'class' => \Doctrine\ORM\Mapping\Annotation::class,
],
],
'connection' => [
'orm_default' => [
'charset' => 'UTF8mb4',
'collation' => 'UTF8mb4_unicode_ci',
]
],
'configuration' => [
'orm_default' => [
'result_cache' => 'custom_cache',
'metadata_cache' => 'custom_cache',
'query_cache' => 'custom_cache',
'hydration_cache' => 'custom_cache',
]
],
'cache' => [
'orm_default' => [
'custom_cache' => [
'class' => CustomCacheProvider::class, // Because Doctrine Cache breaking changes
],
]
]
],
'dependencies' => [
'factories' => [
'doctrine.entity_manager.orm_default' => \Roave\PsrContainerDoctrine\EntityManagerFactory::class,
],
]
);
Edit: With some debug i found that problem is with cache factory, maybe related with https://github.com/Roave/psr-container-doctrine/issues/46
It's possible to disable cache for now, while I'm in developement time?