Silex and MongoDB, Silex Extension

I would like to use Silex with MongoDB. I think the best way is to use the Silex extension, which again uses the Doctrine MongoDB libraries.

There are currently two Silex extensions that seem to provide this functionality. https://github.com/fate/Silex-Extensions and also https://github.com/docteurklein/SilexExtensions

Except the first one adds more other extensions and the second uses submodules (which I would prefer) instead of vendors.sh, are there more things to take care of?

Can someone recommend this or that?

+4
source share
2 answers

These are brand new MongoDB providers with multi-connection support.

MongoDB: https://github.com/saxulum/saxulum-doctrine-mongodb-provider

MongoDB ODM: https://github.com/saxulum/saxulum-doctrine-mongodb-odm-provider

+5
source

Update: The extensions below are deprecated, pls use the answer above.


to answer myself: https://github.com/fate/Silex-Extensions uses the Doctrine MongoDB abstraction level while https://github.com/docteurklein/SilexExtensions uses the Doctrine MongoDB ODM (Object Document Mapper)

So, first you can query MongoDB via Doctrine, and with the second you can transfer model objects to MongoDB, as you know from the symphony.

+8
source

Source: https://habr.com/ru/post/1392911/


All Articles