facile-it/mongodb-bundle
Symfony bundle that integrates Doctrine MongoDB ODM into your app, wiring document managers, repositories, and mappings through simple configuration so you can persist and query MongoDB documents using Symfony's service container.
mongo-php-library ships a major version. Buying it (MIT, zero procurement friction) is the cheaper path unless you have unusual connection topology.MongoDB\Database / MongoDB\Collection from the official driver, not to a bundle-specific API. That means the bundle is swappable: if it's abandoned, you delete the config and wire the client manually. Choosing this over an ODM (or over a proprietary wrapper) deliberately keeps exit cost near zero — a roadmap-level de-risking decision, not just a technical one.Adopt when:
mongodb/laravel-mongodb, and this package is the wrong tool).Look elsewhere when:
Executives: This is glue, not a platform bet. It's MIT-licensed, costs nothing to adopt, and is intentionally easy to remove — all our application code uses MongoDB's official library, so abandoning the bundle is a day or two of rewiring, not a rewrite. It lets us ship flexible-schema and high-write-volume features without committing to a database migration, and it keeps us on the official driver's upgrade and security path. The 2.0 release is a good maintenance signal: it adds Symfony 8 support, so the dependency keeps pace with our framework roadmap rather than pinning us. The cost is a major-version bump that requires Symfony 5.4+ and MongoDB 5.0+ in CI — a scheduling item, not a redesign. The trade-off we're accepting is a small maintainer community; the reversible design is what makes that acceptable.
Engineering: It removes bespoke connection bootstrap, gives us DI-injected Database/Collection services, config-driven multiple connections, and a profiler panel in dev. We stay on mongodb/mongo-php-library's public API — no proprietary abstraction to escape later. In 2.0.0, Symfony 8.0 support was added and Symfony < 5.4 removed, along with CI coverage for MongoDB server < 5.0; there are no new features or deprecations beyond the constraint change. Treat it as a breaking upgrade: check our Symfony pin and our Mongo server version in CI before bumping, keep the composer constraint tight during rollout, and keep the wiring shallow so a swap stays cheap.
How can I help you explore Laravel packages today?