revision_service_interface
interface revision_service_interface
Contract for the revision service responsible for recording state transitions (create, update, delete) of items.
A revision always represents a transition between two states:
- CREATE: old = null, new = item
- UPDATE: old = item, new = item
- DELETE: old = item, new = null
Implementations of this interface MUST:
- Never modify the item state
- Never block the CRUD operation
- Persist only audit/revision data
- Be deterministic and idempotent when possible
Methods
void
create_revision(item_interface|null $old, item_interface|null $new)
Records a revision according to the previous and new state.
Details
at line 45
void
create_revision(item_interface|null $old, item_interface|null $new)
Records a revision according to the previous and new state.