nubitio / platform
Platform foundation for Nubit Symfony apps: domain exceptions, tenant contracts, feature gates, quota contracts, messenger middleware, cache/file/export helpers.
v0.9.0
2026-06-11 03:51 UTC
Requires
- php: >=8.5
- psr/cache: ^3.0
- psr/log: ^3.0
- symfony/console: ^7.4 || ^8.0
- symfony/dependency-injection: ^7.4 || ^8.0
- symfony/http-foundation: ^7.4 || ^8.0
- symfony/http-kernel: ^7.4 || ^8.0
- symfony/messenger: ^7.4 || ^8.0
- symfony/process: ^7.4 || ^8.0
- symfony/service-contracts: ^3.0
- symfony/string: ^7.4 || ^8.0
- symfony/validator: ^7.4 || ^8.0
Requires (Dev)
- league/flysystem: ^3.0
- monolog/monolog: ^3.0
- open-telemetry/api: ^1.0
- phpoffice/phpspreadsheet: ^5.3
- phpunit/phpunit: ^12.0
- pontedilana/php-weasyprint: ^2.2
Suggests
- league/flysystem: Required by Nubit\Platform\Filesystem\FileManager
- monolog/monolog: Required by Nubit\Platform\Observability\Logging\TenantLogProcessor
- open-telemetry/api: Trace correlation in TenantLogProcessor
- phpoffice/phpspreadsheet: Required by Nubit\Platform\Export\XlsExporter
- pontedilana/php-weasyprint: Required by Nubit\Platform\Export\PdfExporter
README
Platform foundation for Nubit Symfony apps: the framework-agnostic contracts and helpers that the rest of the stack builds on.
composer require nubitio/platform
What's inside
- Exceptions —
ServiceException,ValidationException,NotFoundException,DomainProblemException,QuotaExceededExceptionwithDomainErrorCode. Throw these from services;nubitio/api-platformmaps them to proper HTTP responses. - Tenant —
TenantContextplus contracts (TenantRegistryInterface,TenantConnectionSwitcherInterface,TenantDescriptorRegistryInterface,TenantBackupRunnerInterface). Single-tenant apps bind noop implementations; multi-tenant apps provide real ones. - Feature gates —
#[RequiresFeature]attribute +FeatureCheckerInterface. - Quota contracts —
QuotaEnforcerInterface,QuotaResourceResolverInterface. - Messenger —
TenantStampMiddleware/TenantContextMiddlewarepropagate tenant + actor through async messages. - Infra helpers —
CacheManager,FileManager(Flysystem),TenantRateLimiter,XlsExporter(PhpSpreadsheet),PdfExporter(WeasyPrint),PerTenantCommandconsole base class,TenantLogProcessor(Monolog). - HTTP —
ApiResponseJSON envelope (success/message/data).
Heavy integrations (Flysystem, PhpSpreadsheet, WeasyPrint, Monolog, OpenTelemetry) are suggest-ed — install them only if you use the corresponding helper.
License
MIT