Download the PHP package zhortein/multi-tenant-bundle without Composer

On this page you can find all versions of the php package zhortein/multi-tenant-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package multi-tenant-bundle

Zhortein Multi-Tenant Bundle

A fail-closed Symfony 7.4 LTS and Symfony 8.x bundle for building multi-tenant applications, with PostgreSQL RLS as an optional defense in depth.

RC9 supports Symfony Scheduler's persistent RedispatchMessage path without weakening tenant/global classification. Every main HTTP request, received Messenger message, reused Console command, and TenantExecutionBoundaryInterface callback starts from NONE. TenantContext remains a shared mutable service; it is not recreated for every request.

PHP Version Symfony Version PostgreSQL Version

Features

Fail-closed security contract

Tenant-aware Doctrine reads and writes require a valid current tenant and reject invalid mappings, stale filter state, tenant changes, and cross-tenant mutations. Global ORM operations are explicit callbacks through GlobalDoctrineScopeInterface; direct filter disabling is outside the supported contract.

Messenger messages implement exactly one of TenantAwareMessageInterface or GlobalMessageInterface. Tenant-aware messages require consistent tenant metadata at send and receive time, while global messages must never carry a tenant stamp. See the RC1 to RC2 migration guide.

Messenger transport selection is explicit: tenant_transport preserves the historical per-tenant map/default behavior, while symfony_routing leaves transport stamps untouched so framework.messenger.routing and #[AsMessage] work natively. Native mode has no bundle fallback; an unrouted message with a handler may run synchronously. See RC7 to RC8 migration guide.

Persistent Symfony Scheduler work uses a classified application message inside Symfony's RedispatchMessage, with an explicit persistent destination. Directly scheduling the application message can execute its handler in the Scheduler Worker because the Scheduler envelope is already marked as received. See the RC8 to RC9 migration guide.

Installation

Install the bundle via Composer:

The core dependency set and optional Mailer, Twig, Monolog, and PSR-16 integrations are listed in the dependency classification.

Enable the bundle in your config/bundles.php:

Quick Start

1. Create Your Tenant Entity

2. Configure the Bundle

Create config/packages/zhortein_multi_tenant.yaml:

3. Create Tenant-Aware Entities

4. Use in Controllers

๐Ÿ“š Documentation

๐Ÿš€ Getting Started

๐Ÿ—๏ธ Core Concepts

๐Ÿ”ง Service Integration

๐Ÿ—„๏ธ Database Management

๐Ÿ› ๏ธ Development Tools

๐Ÿ“– Examples

Testing with the Bundle

The optional public Test Kit provides three intentionally small APIs:

Quick Example

Running Tests

See the Testing Documentation for installation, lifecycle, and consumer examples.

Code Quality

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Write tests for your changes
  4. Ensure all tests pass and code meets quality standards
  5. Submit a pull request

See CONTRIBUTING.md for detailed guidelines.

License

This bundle is released under the MIT License. See the LICENSE file for details.

Support

Object storage

The optional object storage core provides durable tenant-aware references and a backend-independent contract, disabled by default. The optional Flysystem/S3-compatible bridge adds real MinIO proofs and leaves the historical file API unchanged. RC12 remains a prerelease. Its optional audit API adds lazy location inventory, explicit scopes and logical identity observations. Audit is disabled by default; historical objects without identity remain readable. Upgrading enables no integration and runs no SQL, object or metadata migration. See the RC11 to RC12 migration guide, including the trust boundary, progressive adoption and application rollback.

Changelog

See CHANGELOG.md for version history and upgrade instructions.


All versions of multi-tenant-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
doctrine/dbal Version ^3.8 || ^4.4
doctrine/doctrine-bundle Version ^2.19 || ^3.3
doctrine/doctrine-migrations-bundle Version ^3.4 || ^4.0
doctrine/migrations Version ^3.0
doctrine/orm Version ^3.5
doctrine/persistence Version ^3.3 || ^4.0
psr/cache Version ^3.0
psr/event-dispatcher Version ^1.0
psr/log Version ^3.0
symfony/config Version ^7.4 || ^8.0
symfony/console Version ^7.4 || ^8.0
symfony/dependency-injection Version ^7.4 || ^8.0
symfony/event-dispatcher Version ^7.4 || ^8.0
symfony/event-dispatcher-contracts Version ^3.4
symfony/filesystem Version ^7.4 || ^8.0
symfony/finder Version ^7.4 || ^8.0
symfony/http-foundation Version ^7.4 || ^8.0
symfony/http-kernel Version ^7.4 || ^8.0
symfony/messenger Version ^7.4 || ^8.0
symfony/service-contracts Version ^3.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zhortein/multi-tenant-bundle contains the following files

Loading the files please wait ...