Download the PHP package apajo/symfony-multi-tenancy-bundle without Composer
On this page you can find all versions of the php package apajo/symfony-multi-tenancy-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download apajo/symfony-multi-tenancy-bundle
More information about apajo/symfony-multi-tenancy-bundle
Files in apajo/symfony-multi-tenancy-bundle
Package symfony-multi-tenancy-bundle
Short Description Symfony multi tenancy bundle
License MIT
Homepage https://www.apajo.ee
Informations about the package symfony-multi-tenancy-bundle
Symfony Multi Tenancy Bundle
Description
There are many packages that provide multi tenancy in Symfony but all of them focus on the database. This package's goal is to provide a way to manage any kind of configuration in your system.
This bundle aims to provide multi tenancy on a higher level. It provides a way to dynamically change the system configuration based on the tenant (database, media provider, mailer etc).
It also bundles a way to manage migrations for each tenant.
The package's development is in early stages, any feedback is welcome.
Requirements
- Symfony 6.4 / 7.1
- Doctrine Bundle 2.12
- Doctrine Migrations Bundle 3.3
- Symfony Security Bundley
- PHP 8.2
Installation
Configuration
doctrine.yml
You need 2 connections and entity_managers:
In this case thay are named default
and tenant
but you can name them as you wish.
NB! Third party packages may require the
default
connection to be present so you might want to keep thedefault
name.
Connection and entity manager default
are common for all the individual tenants.
Connection and entity manager tenant
are specific for the tenant.
doctrine_migrations.yml
Configuration
Adapters
Adapters are responsible for dynamic configuration changes based on tenant table values at runtime.
For more on (built-in) adapters see Adapters directory
Resolvers
Resolvers are responsible for resolving current tenant.
For more on (built-in) resolvers see Resolvers directory
Database migrations
Create migration (or diff)
Migrate tenants
Migrate a single tenant
Examples
Switch/select tenant
Iterate over all tenant environments
Issues
Feel free to report an issue under GitHub Issues
Known Issues
- Resetting to default/initial tenant does not work
Contributing
Feel free to contribute
Thanks to
This bundle is inspired by the RamyHakam / multi_tenancy_bundle
All versions of symfony-multi-tenancy-bundle with dependencies
doctrine/annotations Version ^2.0
doctrine/doctrine-bundle Version ^2.12
doctrine/doctrine-migrations-bundle Version ^3.3
knplabs/gaufrette Version ^0.11.1
symfony/config Version ^6.4|^7.1
symfony/dependency-injection Version ^6.4|^7.1
symfony/filesystem Version ^6.4|^7.1
symfony/mailer Version ^6.4|^7.1
symfony/orm-pack Version ^2.4
symfony/runtime Version ^6.4|^7.1
symfony/security-bundle Version ^6.4|^7.1