How to setup multiple database connection using doctrine on Expressive?

Looks like you are missing the $configKey. Have a look at this example: https://github.com/DASPRiD/container-interop-doctrine#configuration

return [
    'dependencies' => [
        'factories' => [
            'doctrine.entity_manager.orm_default' => \ContainerInteropDoctrine\EntityManagerFactory::class,
            'doctrine.entity_manager.orm_other' => [\ContainerInteropDoctrine\EntityManagerFactory::class, 'orm_other'],
        ],
    ],
];
2 Likes