kumwe / business-surface-contract
Portable custom business action, view and field presentation contracts.
Package info
github.com/kumwe/business-surface-contract
pkg:composer/kumwe/business-surface-contract
Requires
- php: ^8.5
- ext-mbstring: *
- kumwe/access-context: 0.1.2
- kumwe/canonical-json: 0.1.1
- kumwe/contribution: 0.1.1
- kumwe/conversion: 0.1.5
- kumwe/idempotency: 0.1.2
- kumwe/record-model: 0.1.3
- kumwe/record-query: 0.1.3
- kumwe/record-values: 0.1.4
Requires (Dev)
- ext-zip: *
- phpstan/phpstan: ^2.1
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^12.0
- squizlabs/php_codesniffer: ^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-12 15:15:17 UTC
README
Portable custom business action, view and field presentation contracts under Kumwe\BusinessSurface\Contract\.
The package defines typed handler inputs/results, bounded field presentation models and explicit strategy ports.
Core owns authorization, persistence, transaction boundaries, dispatch, rendering and operational recovery.
Installation and usage
composer require kumwe/business-surface-contract:0.1.3
Requires PHP 8.5 and mbstring. Composer metadata pins the exact published Kumwe dependencies, which resolve through Packagist without custom VCS overrides. Values are constructed directly and host ports are explicit inputs; no ConfigProvider or captured actor/site/request/container context is registered.
FieldPresentationModel receives an explicit CanonicalEncoder after the required flag. It validates approved
exact-value inputs before encoding, and does not retain the encoder. Core selects its implementation binding.
See the standalone example, public API,
Core contract and integration.
Boundaries and compatibility
Secret editors cannot retain values; read contexts cannot enable editing. Field inputs preserve approved immutable domain values and reject arbitrary objects, callbacks, floats and resources. Retained arrays detach caller references and enforce depth, width, node and byte limits. Custom payloads/results reject references that could mutate an already validated readonly value. See compatibility and contract guarantees.
Published versions, package CI, independent verification and Core acceptance remain separate observations. Pre-1.0 consumers select an exact verified version. Dependency status records the current graph; architecture preserves the ownership boundary.
Development
npm ci --prefix tools/schema-validator --ignore-scripts composer install composer check composer examples
Node.js 20+ runs the pinned complete Draft 2020-12 schema validator. The package gate also checks source/API, architecture, static analysis, coding standards, behavior/conformance, exact dependencies, examples, security and a fresh no-dev archive consumer. Development tooling is excluded from production archives. See test ownership, releasing, release record and security.