diff --git a/src/DocumentRepositoryAutoconfigureCompilerPass.php b/src/DocumentRepositoryAutoconfigureCompilerPass.php index 35f19e8..ceb03d2 100644 --- a/src/DocumentRepositoryAutoconfigureCompilerPass.php +++ b/src/DocumentRepositoryAutoconfigureCompilerPass.php @@ -50,7 +50,7 @@ public function process(ContainerBuilder $container) private function getFullyQualifiedDocumentClassNames(ContainerBuilder $container): array { - $doctrineConfig = array_merge(...$container->getExtensionConfig('doctrine_mongodb')); + $doctrineConfig = array_merge_recursive(...$container->getExtensionConfig('doctrine_mongodb')); $documentDirs = array_map(function (array $mappingConfig) use ($container) { return $container->getParameterBag()->resolveValue($mappingConfig['dir']); }, $doctrineConfig['document_managers']['default']['mappings']);