fluxter / saas-provider-bundle
The SaaS Provider Bundle for easy SaaS provisioning
Package info
github.com/Fluxter/symfony-saas-provider-bundle
Type:symfony-bundle
pkg:composer/fluxter/saas-provider-bundle
2.0.0-BETA5
2022-07-07 22:26 UTC
Requires
- php: ^8.1
- symfony/doctrine-bridge: ^4.4||^5.4||^6.0
- symfony/form: ^4.4||^5.4||^6.0
- symfony/framework-bundle: ^4.4||^5.4||^6.0
- symfony/orm-pack: ^1.0||^2.0
- symfony/twig-bundle: ^4.4||^5.4||^6.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- phpunit/phpunit: ^8.3
- symfony/yaml: ^5.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-18 15:48:33 UTC
README
The corresponding provider bundle for the Fluxter SaaS Consumer bundle
Requirements
- PHP 8.2 or newer (Symfony 8 requires PHP 8.4)
- Symfony 7 or 8
- Doctrine ORM 2.17+ / 3 with DoctrineBundle 2.11+ / 3
How to install
composer require fluxter/saas-provider-bundle
How to implement
- Create a client entity, that implements the TenantInterface
- Create a Client Parameter entity, that implements SaasClientParameterInterface
- Configure the bundle
# config/packages/saas_provider.yaml saas_provider: client_entity: App\Entity\Tenant # Optional: host that works without a tenant (e.g. the landing page / sign up) global_url: app.yourdomain.tld # Optional: regular expressions of routes that also work without a tenant exclude_routes: - '^_profiler' - '^_wdt'
- Configure your firewall to the correct voter mode
# config/packages/security.yaml security: access_decision_manager: strategy: unanimous allow_if_all_abstain: false
Development
Everything runs inside the dev container (.devcontainer/), so only Docker is needed, no local PHP.
You can also open the project in VS Code with the "Dev Containers" extension.
make help # list all targets make install # composer install make tests # run the PHPUnit test suite make composer c="require foo/bar" # run any composer command make shell # open a shell in the container make lint # check coding standards (make fix to fix them)
Test against a specific PHP / Symfony version (like the GitHub Actions matrix does):
make update tests PHP_VERSION=8.2 SYMFONY=7.4 make matrix # every PHP / Symfony combination make lowest # lowest supported dependencies