Skip to content

Reference

phil/edit-lock-bundle

PHP

ClassRole
PhilEditLockBundleThe bundle: its configuration, the tables mapped for Doctrine, its CSRF token among the stateless ones, the assets mapped for AssetMapper, Mercure turned on with MercureBundle
Domain\ValueObject\LeaseKeyA resource, and optionally one of its blocks; overlaps(), covers(), equals()
Domain\ValueObject\HolderWho holds a lease: an identifier and a name
Domain\Model\LeaseOne holder's right to write a key until a moment; grant(), restore(), renewed(), passedTo(), the table phil_edit_lease
Domain\Model\LeasedResourceA resource leased, the row of phil_edit_lease_resource each claim on it locks
Domain\Repository\LeaseRepositoryWhere leases are kept, by compare-and-set, claims on one resource run one at a time by exclusively()
Domain\Exception\EditLockException, InvalidLeaseThe bundle's exceptions, and a lease that cannot be made
Application\EditLocksAcquire, heartbeat, release, leave, take over, holds, presence, purge
Application\EditPolicy, DefaultEditPolicyWho may edit and take over; the default for the application's own code
Application\BlockSavesBlocks checked, written by their holder, kept and told
Application\BlockStoreWhere the application keeps saved blocks
Application\Broadcaster, NullBroadcasterTelling the other writers; telling nobody
Application\HolderProviderWho the current request writes as
Application\Exception\LeaseHeld, LeaseLost, EditRefused, InvalidBlockWhat goes wrong with leases and blocks
Infrastructure\Doctrine\DoctrineLeaseRepositoryThe leases in phil_edit_lease, by plain queries, each claim in a transaction that locks the resource's row
Infrastructure\Memory\InMemoryLeaseRepositoryThe leases in memory, for tests
Infrastructure\Mercure\MercureBroadcasterPresence and blocks published to a Mercure hub
Infrastructure\Mercure\TurboStreamsThe Turbo Streams of presence, saved and removed blocks
Infrastructure\Http\EditLockControllerThe endpoints
Infrastructure\Http\EditLockRequestWhether a request comes from the controller of this site: its header, the browser's Sec-Fetch-Site and the stateless CSRF token phil_edit_lock unless the method is safe; the name of the token's cookie
Infrastructure\Http\RoutesThe names of the routes, keyed as the controller names them
Infrastructure\Http\ClientConfigThe controller's configuration for a resource and a holder
Infrastructure\DependencyInjection\EditLockServicesThe bundle's services
Infrastructure\DependencyInjection\CsrfProtectionPassStops the container with a message that says what to change when framework.csrf_protection is false

Files

FileRole
config/routes.phpThe routes, imported by the application under its prefix
assets/src/collaboration_controller.jsThe Stimulus controller
assets/src/lib/leases.js, csrf.js, snapshot.js, presence.js, streams.js, i18n.jsIts modules, described in JavaScript
assets/styles/edit-lock.cssThe roster's stylesheet
assets/package.jsonThe controller declared for Symfony UX