doesntmattr / mongodb-migrations-bundle

Symfony MongoDBMigrationsBundle
MIT License
23 stars 27 forks source link

Let the ManagerRegistry choose the default DocumentManager #33

Closed graillus closed 4 years ago

graillus commented 4 years ago

When option --dm is not specified, the bundle tries to retrieve the DocumentManager arbitrary named default_document_manager.

But this doesn't work when no such DocumentManager exist. Assuming most of symfony installations use a configuration close to the default one on symfony documentation, it means that they have a default manager named default instead, so this breaks.

The ManagerRegistry is already capable of returning the default manager if no name is specified, let's let it handle this.

This PR fixes #32

arendjantetteroo commented 4 years ago

this works for me, @caciobanu can we merge this?

caciobanu commented 4 years ago

Released: https://github.com/doesntmattr/mongodb-migrations-bundle/releases/tag/v3.0.1

omarboussarsar commented 4 years ago

Thanks for the fix :)