valiton/multisite-bundle
Symfony bundle for running multiple sites from one codebase. Configure distinct hosts, locales and settings per site, with automatic host-based detection and shared routing, templates and services across all your applications.
Architecture fit. valiton/multisite-bundle is a Symfony bundle, not a Laravel package. It hooks into the Symfony full-stack framework through a DI extension, a kernel event subscriber, and the Symfony CMF RoutingBundle chain router, and it typically persists site definitions via Doctrine PHPCR-ODM. Laravel exposes none of those seams: there is no bundle registration, no ChainRouter, no HttpKernel event lifecycle, and no PHPCR document manager by default. The package therefore cannot be dropped into a Laravel application — it can only be mined for design patterns.
Integration feasibility. Low as a dependency, moderate as a reference. Composer resolution is the first blocker: the bundle's Symfony and CMF version constraints predate Symfony 4, and the PHPCR-ODM/Jackalope transitive tree is heavy and itself largely dormant. Even on a Symfony application we would be adopting an end-of-life stack.
Technical risk. High on every axis:
Key questions for the product/engineering conversation.
site_id scoping, or shared data with per-site presentation only?acme.com vs beta.com), path-based (/uk, /de), or both?Stack fit. Treat the bundle as an architectural reference, not a dependency. The transferable ideas are: a SiteProvider/SiteRepository abstraction, host-to-site matching at request entry, and a site context object made available to routing, views, and caching. All three map cleanly onto Laravel middleware, a Site model, and container-scoped context.
Migration path. Do not install the bundle. Reimplement the concepts natively. A credible Laravel implementation is small: a Site Eloquent model (host, locale, theme, status), a ResolveSite middleware that matches Request::getHost() against a cached site map and binds a SiteContext singleton, host-constrained route groups or a route resolver, and a global scope or query builder macro for site_id. This is on the order of a few days to two weeks depending on admin UI scope, versus weeks of fighting PHPCR integration for a worse result.
Compatibility. Assume incompatible. Symfony 2.x/3.x-era constraints will not resolve against a modern Laravel/Symfony dependency graph, and forcing it via --ignore-platform-reqs produces a runtime that fails at container compile time. There is no Laravel service provider, no publishable config, no facade — nothing to bridge.
Sequencing.
stancl/tenancy, spatie/laravel-multitenancy, or a custom ~200-line implementation. For host-based, shared-schema multisite, custom is usually cheapest.Recommendation. Reject as a dependency; adopt as a design reference. The 0.025 score is consistent with what the repository inspection shows.
Maintenance. Zero upstream. Any defect, PHP version bump, or security advisory in the transitive tree becomes our problem. If we forked, we would own a PHPCR-coupled codebase our team does not know — the worst of both worlds.
Support. No documentation beyond Symfony CMF-era material, no maintainer response, no community. Internal onboarding would rely on reading source. Contrast with stancl/tenancy or spatie/laravel-multitenancy, which have active maintainers, docs, and issue histories.
Scaling. The bundle's model implies a PHPCR/JCR backend — an additional stateful service to operate, back up, and monitor, sitting beside our existing database. A native Laravel approach scales with infrastructure we already run: the site map is cacheable in Redis, and per-site cache namespacing is a solved problem. The realistic scaling cost of the native path is cache-key discipline, not infrastructure.
Failure modes to design against (native path).
Host blindly; otherwise cross-site data exposure.Ramp-up. Adopting the bundle means ramp-up on Symfony DI, CMF routing, and PHPCR simultaneously — an unreasonably steep curve for the delivered value. A native Laravel implementation is legible to any mid-level Laravel engineer within a sprint, and the resulting code is one the team can actually maintain.
How can I help you explore Laravel packages today?