Changelog
phil/edit-lock-bundleAll notable changes to phil/edit-lock-bundle will be documented in this file.
Updates should follow the Keep a CHANGELOG principles.
0.1.0-alpha - 2026-11-11
Added
LeaseKeyandHolder: what a lease is on — a resource, or one block of it by its identifier — and who holds it;InvalidLeasefor a key, a holder or a duration a lease cannot be made of, andEditLockExceptionfor every exception of the bundle.Lease: one holder's right to write a key until a moment, granted, renewed, passed on or restored, versioned so that a write replaces only the version read, and mapped for Doctrine as the tablephil_edit_lease;LeasedResource, the row ofphil_edit_lease_resourceeach claim on a resource locks.EditLocks: acquire, heartbeat, release, leave, take over, holds, presence and purge, the whole resource and its parts excluding each other, each claim run while no other claim on its resource runs, a lost race or a claim the store gave up tried again three times, the policy asked again at each heartbeat, which releases the lease of a holder no longer allowed;EditPolicyandDefaultEditPolicy;LeaseHeld,LeaseLostandEditRefused.BlockSaves: a block checked byphil/ujo, written only by the holder of its lease or of the whole resource whom the policy still lets edit it, handed to the application'sBlockStore, and told to the other writers with its place in the document;InvalidBlock.BroadcasterandNullBroadcaster;MercureBroadcasterandTurboStreams: presence and saved and removed blocks pushed to one topic per resource as Turbo Streams, private by default, a hub that cannot be reached logged.LeaseRepository, written by compare-and-set, its claims on one resource run one at a time byexclusively();DoctrineLeaseRepository, by plain queries that leave the entity manager open when a race is lost, each claim in a transaction that locks the resource's row, a deadlock or a wait cut short undone and given up;InMemoryLeaseRepository, for tests.PhilEditLockBundle, configured underphil_edit_lock:seconds,store,connection,holder_provider,policy,block_storeandmercure(enabled, on when MercureBundle is registered,hub,topic_prefix,private); the tables mapped for Doctrine; the controller's CSRF token added to the stateless ones of FrameworkBundle, andCsrfProtectionPass, which stops the container with a message whenframework.csrf_protectionis false; the controller and the stylesheet mapped for AssetMapper.HolderProvider,EditLockController,EditLockRequestand the routes inconfig/routes.php: acquire, heartbeat, release, take over, leave, presence, save and remove, each for the controller's own header, the browser'sSec-Fetch-Site, Symfony's stateless CSRF check of the tokenphil_edit_lockon eachPOST(the presence, aGET, carries none), a holder and the application's policy.ClientConfig: the controller's configuration for one resource and one holder — the endpoints, the hub's subscription URL by the protocol version of the hub, the topic, the duration, the takeover offered, the name of the CSRF cookie.- The
collaborationStimulus controller: the lease follows the writer from block to block and is kept by heartbeats, the held block saved or removed as the editor writes, the blocks of others closed and named, their saves applied to the block editor, a roster with takeover, presence asked at each heartbeat without Mercure, every lease given up when the page closes, labels in English and French, a new CSRF token with eachPOST. Its pure modules — lease requests and their double-submitted token, snapshots of the document, presence, Turbo Streams, labels — are tested under Node's test runner. - The stylesheet
edit-lock.css, on custom properties that follow PHIL UX or the page's own colours. - The documentation in
doc/, one file per topic, indexed by the README. CONTRIBUTING.md,SECURITY.mdandCODE_OF_CONDUCT.md.