User Guide¶
Everything you need to install, configure, and use Tenancy Bundle in your Symfony application.
Getting Started¶
New to the bundle? Start here:
- Installation — composer require, bundle registration, tenancy:init
- Getting Started — 5-minute end-to-end walkthrough
- Configuration Reference — every
tenancy.yamlkey explained
Features¶
- Resolvers — subdomain, header, query param, console, custom
- Database-per-Tenant —
Doctrine\DBAL\Driver\Middleware-based connection switching - Shared-DB Driver — SQL filter with
#[TenantAware]attribute - Cache Isolation — per-tenant cache namespace
- Messenger Integration — TenantStamp, sending and worker middleware
- CLI Commands — tenancy:migrate, tenancy:run
- Testing — InteractsWithTenancy PHPUnit trait
- Strict Mode — data leak prevention (default ON)
Real-World Examples¶
- SaaS Subdomain — full subdomain-based multi-tenant SaaS
- API Header — X-Tenant-ID header for API-first apps