kumwe / record-model
Portable immutable records, revisions, replay outcomes and scope values.
Requires
- php: ^8.5
- php-64bit: *
- ext-json: *
- ext-mbstring: *
- kumwe/access-context: 0.1.2
- kumwe/business-definition: 0.1.2
- kumwe/record-values: 0.1.4
- ramsey/uuid: ^4.9
Requires (Dev)
- ext-zip: *
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^12.0 || ^13.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:14:25 UTC
README
Immutable records, revisions, replay outcomes and scope values under Kumwe\Record\Model.
Installation
Requires 64-bit PHP 8.5 with JSON and mbstring. Pin an exact pre-1.0 release:
composer require kumwe/record-model:0.1.3
Composer declares exact Access Context, Business Definition and Record Values requirements. The version badge links published packages; CI reports default-branch package checks. Core integration and independent release verification remain consumer responsibilities.
Usage and Core contract
require 'vendor/autoload.php'; \Kumwe\Record\Model\BusinessRecordRequestGuard::definition('acme.invoice'); $window = new \Kumwe\Record\Model\BusinessRecordReplayWindow();
Construct values directly. Nested record/revision fields are detached from caller references; actor and field bounds are validated, and optimistic version overflow uses the documented exception family. Core owns persistence, transactions, authorization, trusted clocks, replay storage, concurrency and delivery. A replay window value does not implement replay storage or claim processing.
See public API, architecture, integration, dependency contract, test ownership, release record and standalone consumer.
Development
Requires Node.js 20+ for development schema validation:
npm ci --prefix tools/schema-validator --ignore-scripts composer install composer check
Complete Ajv2020/YAML schema and rejection checks run alongside PHP behavior, conformance, architecture, static analysis, manifests/governance, audit, dependency identity, release automation and a no-dev authoritative archive consumer. CI runs PHP 8.5 on Linux. Schema tooling remains excluded from consumer archives.
Published tags remain fixed. See releasing and changelog. Licensed under Apache-2.0.