I don't think the issue comes from my configuration, but rather from the fact that the bundle tries to get the default_document_manager document manager by default. But it doesn't exist, the default manager is named default.
IMO the bundle should not be responsible for choosing the name of the default document manager, the ManagerRegistry::getManager($name) does the job when called with null
Since I upgraded from
2.0.1
to3.0.0
, I get the following error:Looks like the bundle is tries to retrieve the
default_document_manager
when the command-line option--dm
is not provided.Before the upgrade, the same command with same configuration worked fine. I tested to upgrade to symfony 5, but didn't help.
Bundles installed
doesntmattr/mongodb-migrations-bundle: 3.0.0 doctrine/mongodb-odm: 2.0.5 doctrine/mongodb-odm-bundle: 4.1.1 symfony: 4.4
Bundles configuration
doesntmattr/mongodb-migrations-bundle configuration:
doctrine/mongodb-odm-bundle configuration:
I don't think the issue comes from my configuration, but rather from the fact that the bundle tries to get the
default_document_manager
document manager by default. But it doesn't exist, the default manager is nameddefault
.IMO the bundle should not be responsible for choosing the name of the default document manager, the
ManagerRegistry::getManager($name)
does the job when called withnull
I will open a PR to fix this behaviour
Thanks