gam6itko/doctrine-multibase-bundle
A Symfony bundle that adds multi-database support to Doctrine ORM: configure several connections and assign entities to them via attributes, letting a single application persist to and query from multiple databases.
Connection/EntityManager (or a custom compiler-pass-driven registry). This package is a ready-made, MIT-licensed implementation of that pattern — useful as a reference design even if you ultimately build your own.Consider it when:
Look elsewhere when:
For executives: We're evaluating a lightweight, MIT-licensed component that would let one application talk to multiple database instances and switch between them at runtime. This supports a database-per-tenant or per-region model without standing up a separate deployment for each customer — potentially a meaningful reduction in infrastructure and operational cost. The caveat is maturity: the package has essentially no adoption and a single maintainer, so we should treat it as a reference implementation or vendored code, not a strategic dependency. Recommendation: use it to validate the architecture in a time-boxed spike; budget for either forking it or building a small in-house equivalent before it goes near production.
For engineering: It solves a narrow, well-understood problem — dynamically rebinding Doctrine's base connection to different instances in a Symfony app. Integration surface is small (bundle registration plus configuration), so the spike cost is low. The trade-offs are real: no community maintenance, no dependents, unknown compatibility with future Doctrine/Symfony majors, and no coverage of tenant lifecycle concerns like per-tenant migrations, connection pooling, or isolation guarantees. Plan to own the code: pin/fork the source, add tests around connection switching and request scoping, and document the failure modes. If the spike validates the model, decide explicitly between forking this and building a minimal internal replacement — the latter is likely only a few hundred lines and removes the dependency risk entirely.
How can I help you explore Laravel packages today?