apajo/symfony-multi-tenancy-bundle
default/tenant) approach mirrors industry best practices (e.g., shared vs. isolated schemas).DatabaseAdapter, FilesystemAdapter) and resolvers (e.g., HostBasedResolver) follow a plugin-like architecture, allowing customization without core modifications. This is critical for long-term maintainability.default connection (e.g., legacy auth systems). Mitigation: Test early with critical bundles (e.g., security, media).HostBasedResolver vs. middleware-based).default.yml/tenant.yml) require discipline to avoid drift. Risk: Tenant-specific migrations may conflict with shared schema changes.HostBasedResolver fit, or will a custom resolver be needed?MailerAdapter, CacheAdapter) covered? If not, can they be extended?tenants:migrations:migrate command is tenant-specific—will this integrate with existing pipelines?EventDispatcher, DependencyInjection). Non-Symfony PHP projects (e.g., Laravel) would require significant refactoring./tenant/{id} to the bundle’s resolver while keeping /legacy on the old system.tenants:migrations:diff to generate tenant-specific migrations.default) schema first, then tenant-specific (tenant) migrations.TenantInterface integrates with your user provider.KERNEL_REQUEST event or middleware. Recommendation: Use middleware for early resolution (e.g., before Doctrine loads).@ORM\Entity or EntityManager directly may break. Mitigation:
EntityManager to route calls to the correct tenant EM.EnvironmentProvider to inject tenant-aware services.default/tenant) in doctrine.yml.TenantInterface) and resolver (e.g., HostBasedResolver).FilesystemAdapter) in services.yml.default.yml and tenant.yml migration paths.php bin/console tenants:migrations:diff to generate baseline migrations.EnvironmentProvider for tenant context.apajo_multi_tenancy.yml) risk divergence. Mitigation:
TENANT_{ID}_MAILER_TRANSPORT).Validator).composer.json until stability improves.default or tenant connection issue?").ErrorListener).Request attribute).server_version tuning).tenant connection health separately.HostBasedResolver) scale well, but stateful adapters (e.g., filesystem) may need distributed locks.LockFactory for shared resource access.How can I help you explore Laravel packages today?