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.
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:
join(), no schema migrations in the SQL sense, no auto-increment semantics).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.
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.Key questions to answer before any code is written:
ext-mongodb, and the mongodb/mongodb library version?mongodb/laravel-mongodb? Absent a compelling answer, this evaluation terminates here.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:
composer why-not / inspect illuminate/support and illuminate/database constraints against our Laravel version before committing to a spike.composer.json (no floating ^ on an unmaintained package) and commit the lockfile.class_alias deliberately or, better, don't.Sequencing:
failed_jobs, soft deletes, timestamps, and transaction behavior on the target server version.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.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.
How can I help you explore Laravel packages today?