Download the PHP package nubitio/platform without Composer
On this page you can find all versions of the php package nubitio/platform. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nubitio/platform
More information about nubitio/platform
Files in nubitio/platform
Package platform
Short Description Platform foundation for Nubit Symfony apps: domain exceptions, tenant contracts, feature gates, quota contracts, messenger middleware, cache/file/export helpers.
License MIT
Homepage https://github.com/nubitio/nubit-symfony/tree/main/packages/platform
Informations about the package platform
nubitio/platform
Platform foundation for Nubit Symfony apps: the framework-agnostic contracts and helpers that the rest of the stack builds on.
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.PostgresTenantBackupRunneris the one shipped backup implementation (pg_dump --format=custom, credentials from the Doctrine connection, password viaPGPASSWORD, dump persisted throughFileManager);nubitio/admin-bundlewires it behindnubit_admin.backup.enabled. - 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) and tenant-aware OpenTelemetry spans viaTenantTracer. - Feature flags — vendor-neutral, typed evaluation through
TenantFeatureFlags; distinct from plan entitlements exposed byFeatureCheckerInterface.StaticFeatureFlagProviderprovides deterministic local defaults and the provider port can be adapted to OpenFeature. - Privacy —
#[SensitiveData],DataRedactorand sink-specific policies protect structured logs, traces, analytics and integrations. - Analytics — typed, versioned events with explicit purpose, consent checks, deduplication and provider-neutral sanitized delivery.
- Notifications —
NotificationMessage(a scalar-only, Messenger-serializable payload) plusNotificationDispatcherInterfaceandNotificationChannelInterface. The contracts live here so domain code can raise a notification without depending on a delivery mechanism;nubitio/admin-bundlesupplies the Messenger dispatcher and the email/in-app channels. - 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.
Sensitive data
Classify the canonical DTO/entity property once:
For values inserted into an untyped array, classify them explicitly:
SensitiveDataProcessor sanitizes structured Monolog context and extra fields.
TraceAttributeSanitizer applies the same kernel to OpenTelemetry attributes. Restricted
data is dropped by default. Confidential data is masked in logs and HMACed in traces or
analytics when a key is configured; without the key it is dropped.
The processor intentionally does not rewrite arbitrary log or exception messages. Never interpolate secrets or complete request payloads into text:
See the ERP SaaS platform roadmap for the classification matrix, threat model and phased rollout.
Analytics
Analytics payloads must be DTOs so the privacy metadata is applied before a provider receives them:
AnalyticsProviderInterface receives only SanitizedAnalyticsEvent. Product and
marketing events are denied by the safe default consent checker. The included
InMemoryAnalyticsDeduplicator is bounded and suitable for tests or one local process;
production must bind AnalyticsDeduplicatorInterface to an atomic shared store or use
an outbox table with a unique event ID.
License
MIT
All versions of platform with dependencies
psr/cache Version ^3.0
psr/log Version ^3.0
psr/simple-cache Version ^3.0
symfony/clock Version ^7.4 || ^8.0
symfony/console Version ^7.4 || ^8.0
symfony/dependency-injection Version ^7.4 || ^8.0
symfony/http-foundation Version ^7.4 || ^8.0
symfony/http-kernel Version ^7.4 || ^8.0
symfony/lock Version ^7.4 || ^8.0
symfony/messenger Version ^7.4 || ^8.0
symfony/process Version ^7.4 || ^8.0
symfony/service-contracts Version ^3.0
symfony/string Version ^7.4 || ^8.0
symfony/validator Version ^7.4 || ^8.0