Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Mongodb Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Unchanged by this release. facile-it/mongodb-bundle remains a thin Symfony bundle that wires the official mongodb/mongo-php-library into the container as autowirable services (MongoDB\Client, MongoDB\Database, MongoDB\Collection) — a service-integration layer, not an ODM. Strong fit for teams that want explicit, predictable MongoDB access inside a Symfony application without Doctrine ODM's ceremony and lock-in; weak fit for teams expecting repositories, hydrators, and lifecycle events, and non-viable for framework-agnostic or non-Symfony services in a polyglot estate. Note for the record: despite the generic "PHP package" framing, this is Symfony-only — there is no Laravel service provider, and none should be expected.

Integration feasibility. Still conventional and low-ceremony (require, enable in bundles.php, configure a DSN, inject MongoDB\Collection). Two constraints tightened in 2.0.0 and both must be verified before adoption:

  • Symfony floor is now 5.4. Anything below 5.4 is unsupported (#203). Teams on 5.3 or earlier face a Symfony upgrade before they can take 2.x. Teams already on 6.x/7.x are unaffected by the removal and see only the additive benefit.
  • MongoDB server floor is effectively 5.0. CI no longer tests MongoDB <5.0. This is not a hard runtime block — the bundle does not enforce a server version — but it means 4.4-and-below deployments are outside the tested envelope, and 4.4 has been EOL since February 2024. Treat this as an operational prerequisite, not a footnote.
  • Symfony 8.0 ceiling is now explicit. The release is primarily an enablement change: Symfony 8.0 support landed (#203). Given Symfony 8.0's November 2025 release, this is the maintainer tracking the framework's release train rather than lagging it — a meaningfully better signal than the previous assessment could claim.

The ext-mongodb extension remains a host-level prerequisite, resolvable only outside Composer.

Technical risk. The two dominant risks from the prior assessment shift in opposite directions.

Maintenance concentration / signal weakness — partially mitigated. A major release that adds current-Symfony support is exactly the cadence evidence the earlier assessment flagged as missing. One data point is not a trend, but it is the right kind of data point, and it materially lowers (does not eliminate) the abandonment scenario.

Version coupling — now the primary risk, and it has moved from theoretical to scheduled. 2.0.0 is a major version with explicit removals, which under semver implies breaking changes beyond the two listed. Because this package is a configuration-and-wiring layer, its breaking surface is precisely the config schema — the keys, service IDs, and DI aliases consuming applications bind to. The changelog as published lists only added/removed support ranges and does not describe config-schema changes. That gap is the thing to close before upgrading: read the actual diff or upgrade guide, and do not assume 2.0.0 is a no-op for existing 1.x configs.

Underlying driver risk is unchanged and remains a mitigation — the official library's maturity passes through.

Key questions.

  • What is the supported version matrix across Symfony, PHP, and ext-mongodb? Partially answered. Symfony 5.4–8.0 and MongoDB server 5.0+ are now asserted by code and CI. Still open: the PHP version floor/ceiling, and the ext-mongodb / mongodb/mongo-php-library version constraints 2.0.0 requires.
  • New: Does 2.0.0 change the configuration schema, service IDs, or DI aliases relative to 1.x? If yes, is there a written 1.x → 2.x upgrade path and a deprecation layer, or is it a hard cut?
  • New: Will the 1.x line receive security or compatibility fixes now that 2.x has removed older Symfony support, or is 1.x immediately EOL?
  • Who are the effective maintainers, and what is the observed response time on issues/PRs over the last 12 months? (A major release is a good moment to re-check: did the PR review show multiple contributors or a single maintainer?)
  • Does the bundle support multiple named connections/clients, replica-set and SRV connection strings, and per-connection auth — the configurations production deployments actually need?
  • Is there any instrumentation (profiler data collector, tracing hooks), or is observability left entirely to the consuming application?
  • How is client lifecycle handled under long-running workers (RoadRunner/Swoole/Messenger)?
  • Is the BC/deprecation policy documented, and does 2.0.0 conform to it?

Integration Approach

Stack fit. Unchanged: a Symfony 6.x/7.x (and now 8.x) application on PHP 8.1+ needing direct, idiomatic MongoDB access — read models, event/audit logs, document stores, a CQRS read side beside a relational write model. Poor fit where the domain needs document mapping, embedding strategies, or ODM lifecycle callbacks, or where the team lacks MongoDB operational competence, since the bundle offers no guardrails beyond DI.

Migration path. Inbound paths are unchanged, with one new branch:

  • From raw driver usage — still near-mechanical and the lowest-risk adoption: replace hand-rolled MongoDB\Client construction with injected services, move the DSN into config, delete bespoke factories.
  • From Doctrine MongoDB ODM — still a re-architecture, not a migration. Scoped project with design review.
  • New: from bundle 1.x to 2.x — treat as a genuine upgrade, not a patch. The removals are only the visible part of the changelog; the config-schema delta is what determines effort. Budget a spike that installs 2.x against a copy of your existing config and boots the container, in CI, before touching a shared environment. If you are on Symfony 6.x/7.x and MongoDB 5.0+, expect little or no work; if you are on Symfony 5.3 or MongoDB 4.4, the bundle upgrade is blocked behind an infrastructure upgrade and should be sequenced after it, not in parallel with it.

Compatibility. The three axes remain, but two now have published answers:

  1. Symfony — 5.4 through 8.0, enforced by CI. Do not read the 5.4 floor as a recommendation: 5.4 is out of security support, so the real target is 6.4/7.x/8.0.
  2. MongoDB server — 5.0+ is the tested floor; below that is unsupported-but-probably-functional territory you should not plan around.
  3. ext-mongodb / mongodb/mongo-php-library — still the axis most often missed, still not resolvable by Composer, still must be pinned in the base image. Confirm the library version 2.0.0 pulls and that its required extension version is in every environment including CI and local dev containers.

Pin both the bundle and the library explicitly; do not float either in production.

Sequencing. Mostly unchanged, with the upgrade step made explicit:

  1. Confirm ext-mongodb version in every target environment.
  2. New: Confirm Symfony and MongoDB server versions clear the new floors (5.4 / 5.0), and read the 1.x → 2.x diff for config-schema changes.
  3. Introduce (or upgrade) the bundle with a single named connection and the smallest possible surface — one collection into one service — behind a feature flag.
  4. Establish observability before widening usage: pool metrics, command latency, error-rate alerting from the driver's own monitoring hooks.
  5. Expand to additional collections/connections only after a full release cycle in production.
  6. Only then retire legacy manual-client code.

Operational Impact

Maintenance. Low ongoing code maintenance, and the dependency-hygiene burden now looks better owned than it did. 2.0.0 is evidence the maintainer tracks Symfony's release train rather than trailing it, which is the single most important maintenance property for a wrapper of this kind — being stranded on an unsupported Symfony major is the failure mode that matters, and there is now a data point against it. Two caveats: one release is not a cadence, and the major-version bump transfers effort to you. Budget a named owner for the upgrade path, and extend that ownership to tracking major releases specifically, since 2.0.0 demonstrates this package will cut a major version to follow Symfony rather than carry compatibility shims indefinitely. Plan for one bundle major per Symfony major; that is a reasonable and predictable tax, but it must be in the roadmap.

Support. Unchanged: community-tier — GitHub issues, no SLA, no bundle-specific commercial backing, with the mitigating factor that most hard problems are MongoDB-driver problems where the official documentation and commercial support apply directly. The 2.0.0 removals sharpen one support question: with the older-Symfony line dropped, does the maintainer backport fixes to 1.x, or must you be on 2.x to receive anything? Get that answered if you are pinned to Symfony 5.4. Organisations requiring vendor SLAs on data-store integrations should still record this as a gap.

Scaling. Unchanged and inherited from the official driver — pooling, replica-set topology discovery, read-preference routing come for free; the bundle adds no pooling layer and therefore no artificial bottleneck, but also no protection against developers bypassing DI to construct clients per request. The two standing caveats hold: long-running workers (Messenger consumers, RoadRunner) need explicit client-lifecycle review because a container singleton behaves differently than under PHP-FPM; and a low-star package will not have been load-tested across the topologies your estate may run. Nothing in 2.0.0 changes the scaling profile.

Failure modes. Updated set:

  • (a) Extension drift — ext-mongodb mismatched to the library, failing fatally at boot rather than at query time. Unchanged.
  • (b) Config-schema churn between bundle majors — previously hypothetical, now live and scheduled: 2.0.0 is a major with removals, and the published changelog does not describe config-level changes. Silent breakage on upgrade is the concrete near-term risk.
  • (c) Version-floor collision — an estate still on Symfony 5.3 or MongoDB 4.4 cannot take 2.x and must either upgrade the platform or hold an unsupported 1.x. This is the most likely blocker in real environments and should be inventoried before any adoption decision.
  • (d) Connection/auth failures under DSN misconfiguration, poorly surfaced because the bundle adds no diagnostics layer.
  • (e) Abandonment — now lower probability than previously assessed, given demonstrated Symfony 8 enablement, but not eliminated; still the highest-consequence scenario, and still the cheapest to mitigate because a thin wrapper is the cheapest thing to replace in-house.
  • (f) Bypass risk — developers constructing clients directly, defeating the DI contract and producing connection sprawl. Unchanged.

Ramp-up. Unchanged for the most part. Developers fluent in the MongoDB PHP library ramp in hours — there is essentially nothing new beyond the config keys. Developers from Doctrine ODM or relational ORMs face a genuine mindset shift: no unit of work, no identity map, no lazy loading, explicit cursor handling, manual error/retry semantics. Budget a short enablement session plus a reference implementation, and codify conventions (where clients are injected, how collections are named and resolved, how errors are wrapped) in a written standard — the absence of an abstraction layer otherwise produces inconsistent access patterns across teams. Add one item for the upgrade generation: a short internal note on the 1.x → 2.x delta and the new Symfony/MongoDB floors, so teams do not discover them at container-boot time.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package