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 Laravel Package

wangzd/mongodb

A MongoDB integration package for Laravel and PHP, offering database connectivity, query building, and model support so applications can use MongoDB alongside familiar Laravel conventions.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

What it is: A republished fork of the well-known jenssegers/laravel-mongodb ("Moloquent") package — the description is copied verbatim from upstream. It supplies an Eloquent-compatible base model and query builder that translate Laravel's ORM idioms into MongoDB driver calls (via ext-mongodb + mongodb/mongodb). MIT licensed, 0 stars, 0 dependents, single maintainer, no visible release/CI signal.

Architecture fit:

  • Fits Laravel conventions well in principle — models extend a base class, support casts, accessors, relations, pagination, and the familiar query builder, so teams already fluent in Eloquent get a short path to MongoDB.
  • Best suited to document-shaped data: CMS/content payloads, product catalogs with heterogeneous attributes, event/telemetry logs, per-tenant configurable schemas.
  • Weak fit where relational integrity is the point: multi-entity joins, cross-document constraints, reporting that assumes SQL. MongoDB 4.0+ multi-document transactions exist but the Eloquent abstraction leaks here (no join(), no schema migrations in the SQL sense, no auto-increment semantics).
  • Introduces a second persistence paradigm into the codebase — a durable architectural cost regardless of which package you pick.

Integration feasibility: Technically low effort (composer require, add connection config, extend the base model). Practically blocked on unknowns: there is no evidence of a support matrix for current Laravel, PHP, or MongoDB server versions, no test suite visibility, and no indication of which upstream commit this fork was cut from.

Technical risk: HIGH. This is the dominant conclusion of the evaluation.

  • Supply chain: Zero stars, zero dependents, unknown maintainer, no security review trail. A low-signal republish of a popular package name is exactly the profile that warrants source review before it enters a build.
  • Drift/fork decay: Upstream (now mongodb/laravel-mongodb, steward-backed) absorbs Laravel 11/12, PHP 8.3/8.4, and MongoDB 7/8 changes plus CVE fixes. Forks at this traction level almost certainly lag by major versions within a year.
  • Namespace and autoload collision: Installing alongside the official package risks duplicate class definitions; documentation, Stack Overflow answers, and AI-generated snippets will resolve to the upstream namespace and silently not apply.
  • Debugging tax: Every issue becomes "is this our bug, the fork's bug, or an upstream bug we can't reproduce?"
  • Abandonment: No bus factor. If the maintainer stops, you inherit the package with no upstream you're entitled to support from.

Key questions to answer before any code is written:

  1. Which upstream tag/commit is this fork pinned to, and what is the diff?
  2. What is the tested compatibility matrix for Laravel, PHP, ext-mongodb, and the mongodb/mongodb library version?
  3. Does the repo ship tests and CI, and do they pass on our target versions?
  4. Are there divergences from upstream (auth provider, connection handling, aggregation builder) that we would depend on?
  5. What is the concrete reason not to use the steward-backed mongodb/laravel-mongodb? Absent a compelling answer, this evaluation terminates here.

Integration Approach

Stack fit: Laravel application + ext-mongodb PHP extension + mongodb/mongodb library. The extension is a hard prerequisite and the most common environment failure — verify it is compiled into the Docker base image, CI runner image, and every long-lived environment, not just local dev. Confirm the MongoDB server version we run is within whatever the pinned driver supports.

Migration path (recommended): Do not adopt this fork as a strategic dependency. Adopt the steward-backed mongodb/laravel-mongodb unless the key questions above surface a specific capability this fork uniquely provides. If the fork is adopted for a constrained reason, contain it: isolate all MongoDB access behind a repository/service layer so the Eloquent base class appears in a small number of files and a swap to upstream is a bounded change.

Compatibility work required:

  • Run composer why-not / inspect illuminate/support and illuminate/database constraints against our Laravel version before committing to a spike.
  • Pin exact versions in composer.json (no floating ^ on an unmaintained package) and commit the lockfile.
  • Verify against the production MongoDB server version, not just a local container.
  • If both packages ever coexist, use class_alias deliberately or, better, don't.

Sequencing:

  1. Source review — read the diff against upstream; confirm no injected code, no telemetry, no unexpected network calls. Small package, cheap to audit, non-negotiable at 0 stars.
  2. Timeboxed spike (3–5 days) in a throwaway branch: CRUD, relations, casts, pagination, aggregation pipeline, and the auth user provider if we intend to use it.
  3. Driver-integration checks on the paths teams forget: session driver, queue failed_jobs, soft deletes, timestamps, and transaction behavior on the target server version.
  4. Bake-off against the steward-backed package on the same spike criteria; prefer the one with CI, releases, and an upstream to escalate to.
  5. Decision gate: adopt / vendor-and-own / reject. If adopted, fork into our own org namespace, add CI, and own patch cadence formally.
  6. Rollout to one bounded, non-critical read/write surface before any system-of-record workload.

Operational Impact

Maintenance: The realistic assumption is that this fork receives no upstream fixes. Treat it as an internally-owned dependency from day one: assign an owner, budget ongoing time for dependency upkeep, and expect a disproportionate share of that budget to land in the quarter we next upgrade Laravel. Schema-less data adds a second maintenance axis — document shape drift in production is an operational problem Eloquent gives you no migration tooling to fix.

Support: No community, no issue triage, no documentation beyond what upstream wrote for a different package. Internal knowledge concentrates in whoever ran the spike; that is a single point of failure. Every external search result will point at a namespace that isn't ours, which lengthens incident diagnosis.

Scaling: The package is a thin translation layer and is rarely the bottleneck — MongoDB is. Scaling outcomes are governed by shard key choice, index design, read preference, and document modeling (embedding vs. referencing), decisions this package does not make for you. Watch Eloquent-shaped costs: N+1 loading, eager-loading on large result sets, and the aggregation builder being materially less mature than its SQL counterpart — complex pipelines will be hand-written and reviewed against raw driver syntax.

Failure modes to instrument for:

  • ext-mongodb missing or mismatched in a new environment → hard fatal at boot.
  • Laravel or PHP upgrade breaking a constraint the fork never updated → deploy-time failure, discovered late.
  • Connection/DSN misconfiguration surfacing as timeouts under load rather than clean errors.
  • Transactional code paths that appear to work but silently don't guarantee atomicity.
  • Inconsistent documents across tenants due to schema-less writes; no migration path to correct them.
  • SCA/licensing tooling flagging an abandoned or unknown-origin dependency at the worst possible moment (audit, procurement, security review).
  • Namespace collision if the official package is later introduced.

Ramp-up: Engineers are productive in 1–2 days on the Eloquent surface. The real curve is MongoDB data modeling, which is a multi-week skill and the actual determinant of success. Ops needs someone who can reason about replica sets, indexes, and backups — this package provides none of that and its low traction means you cannot lean on a community to fill the gap.

Bottom line for the product decision: the technical capability is real and the integration is cheap, but at 0 stars, 0 dependents, and no visible test or release signal, this package imports unquantified supply-chain and abandonment risk into the persistence layer — the one place you cannot afford it. Default to the steward-backed MongoDB Laravel integration and require a documented, capability-specific justification to do otherwise.

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.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels