semitexa / tenancy
Semitexa Tenancy - tenant resolution, scoped context, and multi-tenant application support
Package info
github.com/semitexa/semitexa-tenancy
Type:semitexa-module
pkg:composer/semitexa/tenancy
Requires
- php: ^8.4
- semitexa/core: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- 2026.09.13.1330
- 2026.09.11.0529
- 2026.09.02.0604
- 2026.08.04.2028
- 2026.07.07.1936
- 2026.07.06.1438
- 2026.06.21.0352
- 2026.05.08.1640
- 2026.04.21.0704
- 2026.04.09.1145
- 2026.04.05.0855
- 2026.04.03.1349
- 2026.04.03.1240
- 1.0.9
- v1.0.8
- 1.0.6
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- dev-develop
- dev-chore/phpstan-baseline-cleanup
- dev-review/package-metadata-20260323
This package is auto-updated.
Last update: 2026-09-13 13:41:14 UTC
README
Tenant resolution, scoped context, and multi-tenant application support.
Purpose
Resolves the current tenant per request through a configurable chain of strategies (path, subdomain, header, query param). Stores the resolved tenant in coroutine-safe context for downstream use by ORM, Cache, Storage, and other tenant-aware packages.
Role in Semitexa
Depends on Core. Depended on by ORM, Cache, Search, Media, Scheduler, Workflow, and optionally Locale. Tenancy is foundational to the multi-tenant architecture — when active, ORM scopes queries, Cache namespaces keys, and Storage isolates paths, all transparently based on the resolved tenant.
Key Features
TenancyBootstrapperbuilds resolver chain from env config- Resolution strategies: path, subdomain, header, query param
TenantContextwith coroutine-safeCoroutineContextStoreTenantResolverChaincomposable resolver ordering- Multi-layer tenancy via
LayerDefinition #[AsTenantLayerStrategy]attribute for custom layersTenantRepositoryInterfacefor tenant lookup (config or database-backed)