nubitio/platform

Platform foundation for Nubit Symfony apps: domain exceptions, tenant contracts, feature gates, quota contracts, messenger middleware, cache/file/export helpers.

Maintainers

Package info

github.com/nubitio/platform

Homepage

Issues

pkg:composer/nubitio/platform

Statistics

Installs: 36

Dependents: 2

Suggesters: 0

Stars: 0

v0.9.0 2026-06-11 03:51 UTC

This package is auto-updated.

Last update: 2026-06-12 11:16:04 UTC


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

  • ExceptionsServiceException, ValidationException, NotFoundException, DomainProblemException, QuotaExceededException with DomainErrorCode. Throw these from services; nubitio/api-platform maps them to proper HTTP responses.
  • TenantTenantContext plus contracts (TenantRegistryInterface, TenantConnectionSwitcherInterface, TenantDescriptorRegistryInterface, TenantBackupRunnerInterface). Single-tenant apps bind noop implementations; multi-tenant apps provide real ones.
  • Feature gates#[RequiresFeature] attribute + FeatureCheckerInterface.
  • Quota contractsQuotaEnforcerInterface, QuotaResourceResolverInterface.
  • MessengerTenantStampMiddleware / TenantContextMiddleware propagate tenant + actor through async messages.
  • Infra helpersCacheManager, FileManager (Flysystem), TenantRateLimiter, XlsExporter (PhpSpreadsheet), PdfExporter (WeasyPrint), PerTenantCommand console base class, TenantLogProcessor (Monolog).
  • HTTPApiResponse JSON 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