endurance / route
Routes, immutable content revisions and streaming publication contracts
v0.2.0
2026-11-23 20:54 UTC
Requires
- php: ^8.5
- endurance/foundation: ^0.2.0
- endurance/geo: ^0.2.0
Requires (Dev)
- phpunit/phpunit: ^12.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-23 20:58:05 UTC
README
Immutable Route revisions, streamed content and optimistic publication for PHP 8.5.
composer require endurance/route
Supply a RouteRepository, caller-generated IDs and prepared content:
use Endurance\Foundation\Clock\SystemClock; use Endurance\Route\Application\UseCase\PublishRoute; $publisher = new PublishRoute($repository, new SystemClock()); $route = $publisher->create($routeId, $revisionId, $metadata, $properties, $content); $expected = $route->expectation();
revise()publishes a new immutable content revision using both expected head fields. Metadata changes advance the card version without rewriting content. Keep an exact revision reference when reading retained history.- Geometry, via points, waypoints and cues are separate streams. Via points do not imply geometry; coverage does not certify navigation. Anchors identify an exact occurrence within one revision, including repeated loop coordinates.
- Publication exhausts and validates every stream. Custom storage must implement the atomic writer contract, including private staging, globally unused revision IDs and cleanup that cannot delete committed content after an uncertain acknowledgement.
- Authorization, retention policy and source ownership belong to the application. Reconcile uncertain publication by its stable IDs before retrying.
Executable example with a small in-memory adapter; provide durable storage for persistence and concurrent writers.
License: MPL-2.0.