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

Doctrine Multi Schema Bundle Laravel Package

shoofly/doctrine-multi-schema-bundle

A Symfony bundle that extends Doctrine to support multiple database schemas, letting entities map across schemas and managing connections, migrations, and schema tooling for multi-tenant or modular database setups.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. This is the first and most important finding: shoofly/doctrine-multi-schema-bundle is a Symfony bundle built on Doctrine ORM, not a Laravel package. Laravel's default persistence layer is Eloquent (Active Record) on top of Laravel's own schema builder and migrations; Doctrine is available only via optional community integrations (e.g. laravel-doctrine/orm). Dropping this bundle into a standard Laravel application is not a supported path. It assumes Symfony's DependencyInjection container, bundle registration, and Doctrine's EntityManager/Connection configuration model. The "multiple schemas" capability it advertises is a Doctrine concept (Postgres/MySQL schemas mapped to distinct entity metadata namespaces), and it does not translate to Eloquent models or Laravel migrations.

Integration feasibility. For a Laravel-first team, feasibility is low. There are two realistic routes: (a) adopt Doctrine ORM inside Laravel via a third-party bridge, then wire this bundle's logic manually — at which point you are maintaining a fork of an unmaintained, zero-adoption package against an unsupported integration; or (b) reimplement the multi-schema behaviour natively. Route (b) is almost always preferable: Laravel already supports per-connection schema prefixes, search_path configuration, and per-model $table prefixes, and multi-tenant schema strategies are well-trodden with packages like stancl/tenancy or Spatie's multitenancy. The bundle offers no capability Laravel cannot express more idiomatically.

Technical risk. High across the board. Stars (0) and dependents (0) mean there is effectively no production usage to learn from, no issue history to gauge responsiveness, and no community safety net. The 0.1 composite score signals an abandoned or never-adopted package. Symfony/Doctrine version compatibility is likely pinned to an old major (Doctrine bundles of this vintage typically target Symfony 2/3/4 and Doctrine 2.x), which will conflict with current Symfony 6/7 and Doctrine 3.x. There is real supply-chain and bus-factor risk: a single maintainer, no releases you can audit for recency, and no security disclosure process.

Key questions.

  • Is the actual requirement "multiple database schemas" (Postgres/MySQL schema-per-tenant) or "multiple databases/connections"? These are different problems with different Laravel-native answers.
  • Is the team committed to Doctrine, or is this an Eloquent shop? If Eloquent, this package is out of scope entirely.
  • What is the target DB engine? Multi-schema is materially different on Postgres (search_path, CREATE SCHEMA) versus MySQL (schema == database) versus SQL Server.
  • Do we need per-tenant migrations, connection pooling, and schema switching at request time? If so, the tenancy packages solve this with active maintenance.
  • Is there a hard constraint forcing adoption of this specific bundle, or was it surfaced by a search? If the latter, reject and re-scope.

Integration Approach

Stack fit. Poor for Laravel. This belongs to a Symfony + Doctrine stack. If the organisation is genuinely running Symfony services, the bundle is at least conceptually aligned, but the zero-adoption status still argues for implementing the schema-switching logic directly against Doctrine's Connection and metadata driver rather than depending on the bundle. For a Laravel codebase, the correct integration is not this package.

Migration path. Recommended path: do not integrate. Instead, translate the underlying requirement into a Laravel-native design.

  1. Define the tenancy model. Schema-per-tenant on Postgres is the strongest fit. Use a base connection with a dynamic search_path, switching per request/job via a middleware or tenancy package.
  2. Model the switch point explicitly. A single TenantManager service that resolves the tenant, sets the schema on the connection, and purges/reconnects as needed. This is where the bundle's logic would have lived; own it in-house, it is a few hundred lines.
  3. Migrations. Use Laravel's migration runner with a tenant-aware path (--path=database/migrations/tenant) and run per schema. Keep a tenants registry table in the central schema.
  4. If Doctrine is non-negotiable (legacy domain model), integrate laravel-doctrine/orm first, prove entity metadata and migrations work, and only then hand-roll multi-schema metadata mapping. Treat the bundle as a reference implementation to read, not a dependency to install.

Compatibility. Assume incompatibility until proven. Before any spike, verify the bundle's composer.json constraints against the target PHP, Symfony, and Doctrine versions. Expect conflicts on Symfony 5+ and Doctrine 3. If a proof-of-concept is mandated, timebox it to days, not weeks, and gate it on a passing CI matrix across the versions you actually run.

Sequencing.

  1. Clarify the requirement (schemas vs databases vs tenants) — one workshop.
  2. Spike a Laravel-native schema-switch with two dummy tenants against the real DB engine — one sprint.
  3. Validate migrations, connection pooling behaviour, and query performance under schema switching.
  4. Only if step 2 fails and Doctrine is already in the stack, evaluate the bundle as a reference. Do not sequence it as an install candidate.

Operational Impact

Maintenance. If adopted, you own it. Zero dependents means no upstream pressure to fix bugs and no community patches; you become the de facto maintainer of a fork. Every Symfony/Doctrine upgrade becomes a manual compatibility exercise. Laravel-native alternatives (tenancy packages with active release cadence) shift this ongoing cost onto a maintained upstream. The bundle is a long-tail liability with no offsetting benefit.

Support. No vendor, no SLA, no community. Internal engineers would need Doctrine internals expertise to debug schema-resolution failures — a scarce skill in a typical Laravel team. This is a hiring and on-call consideration, not just a code consideration.

Scaling. Schema-per-tenant scales reasonably on Postgres up to hundreds/low thousands of schemas, then migration fan-out and connection overhead dominate. The bundle does not solve the hard parts (connection pooling across schemas, per-tenant migration orchestration, cross-schema reporting). Those remain your engineering problem either way, which further erodes the bundle's value proposition.

Failure modes. The dangerous ones are silent: wrong search_path leaving a request reading another tenant's schema (a data-leak class of bug), migrations applied to the wrong schema, and cached entity metadata bound to a stale schema. With an unmaintained package and no test coverage you can trust, these failures surface in production rather than CI. Mitigations — per-request schema assertions, integration tests that verify isolation, and a migration audit log — must be built regardless of whether the bundle is used.

Ramp-up. Near-zero transferable knowledge in the market; onboarding engineers means onboarding them to an obscure, unmaintained bundle plus Doctrine. Compare with tenancy packages that have documentation, tutorials, and Stack Overflow presence. Estimate weeks of ramp-up for the bundle path versus days for the native path, and that delta recurs with every new hire.

Recommendation. Reject for a Laravel stack — wrong ecosystem and an unsupported dependency. If the organisation runs Symfony/Doctrine, treat the repository as a design reference for a small in-house schema manager rather than a dependency. Re-scope the requirement with the tenancy questions above before any further evaluation; the 0-star, 0-dependent, 0.1-score profile is a clear signal to look elsewhere.

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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager