PackageTrack
Sign in Get early access

utopia-php/lock

A simple lock library to coordinate access to shared resources across coroutines, processes and hosts

0.3.1 73K downloads/mo #4965 most downloaded on Packagist utopia-php/lock

What this package is like to depend on

Last release 2 days ago

21 Aug 2026

Ships fairly regularly

a new release about every 4 weeks

Nearly every release is documented

notes for 9 of 9 stable releases

Nothing withdrawn

no release was ever pulled

4 months old

9 releases · first in 2026

8 releases in the last 12 months

see the full history below

Release timeline

8 releases · Apr 2026 to Aug 2026
Release Pre-release

Releases

latest 9
  1. 0.3.1 21 Aug 2026
    Release notes
    • fix(lock): jitter the distributed acquire backoff

    Changes: utopia-php/monorepo@lock/0.3.0...lock/0.3.1

    Open source →
  2. 0.3.0 12 Aug 2026
    Release notes
    • feat(lock): let a lease refresh on another connection

    Changes: utopia-php/monorepo@lock/0.2.4...lock/0.3.0

    Open source →
  3. 0.2.5 no date
    Release notes

    Full Changelog: 0.2.4...0.2.5

    Open source →
  4. 0.2.4 05 Aug 2026
    Release notes
    • feat(lock): expose the lease token so a write can be conditional on it
    • docs: centralize CODE_OF_CONDUCT and CONTRIBUTING at the monorepo root
    • docs: enforce documentation style with Vale
    • ci: redirect mirror issues
    • ci: reuse mirror redirect workflow

    Changes: utopia-php/monorepo@lock/0.2.3...lock/0.2.4

    Open source →
  5. 0.2.3 26 Jun 2026
    Release notes
    • refactor: apply baseline rector to packages that lacked a config
    • build: hoist baseline rector + phpstan configs to the root

    Changes: utopia-php/monorepo@lock/0.2.2...lock/0.2.3

    Open source →
  6. 0.2.2 20 Jun 2026
    Release notes
    • refactor(monorepo): simplify absorb/sync flows (-635 LoC)
    • Pin all workflow actions to SHAs with ratchet, enforce in CI

    Changes: utopia-php/monorepo@lock/0.2.1...lock/0.2.2

    Open source →
  7. 0.2.1 10 Jun 2026
    Release notes

    First release cut from the utopia-php monorepo.

    Open source →
  8. 0.2.0 24 Apr 2026
    Release notes

    What's New

    • Breaking: lock classes moved from Utopia\Lock\Lock\* to Utopia\Lock\*.
      Users on 0.1.0 must update imports:

      • Utopia\Lock\Lock\MutexUtopia\Lock\Mutex
      • Utopia\Lock\Lock\SemaphoreUtopia\Lock\Semaphore
      • Utopia\Lock\Lock\FileUtopia\Lock\File
      • Utopia\Lock\Lock\DistributedUtopia\Lock\Distributed

      The Utopia\Lock\Lock interface and Utopia\Lock\Exception hierarchy are unchanged.

    Open source →
    Release notes

    Changed

    • Breaking: lock classes moved from Utopia\Lock\Lock\* to Utopia\Lock\*. Users on 0.1.0 must update imports:

      • Utopia\Lock\Lock\MutexUtopia\Lock\Mutex
      • Utopia\Lock\Lock\SemaphoreUtopia\Lock\Semaphore
      • Utopia\Lock\Lock\FileUtopia\Lock\File
      • Utopia\Lock\Lock\DistributedUtopia\Lock\Distributed

      The Utopia\Lock\Lock interface and Utopia\Lock\Exception hierarchy are unchanged.

    Open source →
  9. 0.1.0 24 Apr 2026
    Release notes

    What's New

    Initial release.

    • Utopia\Lock\Lock interface with acquire, tryAcquire, release, withLock.
    • Utopia\Lock\Lock\Mutex — Swoole coroutine mutex backed by Swoole\Coroutine\Channel(1).
    • Utopia\Lock\Lock\Semaphore — Swoole coroutine semaphore with a configurable permit count.
    • Utopia\Lock\Lock\Fileflock() based file lock (LOCK_EX or LOCK_SH), cooperates with Swoole's runtime hooks.
    • Utopia\Lock\Lock\Distributed — Redis SET NX EX lock with Lua-atomic release and refresh, fractional-second timeouts, optional logger.
    • Utopia\Lock\Exception base exception and Utopia\Lock\Exception\Contention thrown when withLock times out.
    Open source →
    Release notes

    Initial release.

    • Utopia\Lock\Lock interface with acquire, tryAcquire, release, withLock.
    • Utopia\Lock\Lock\Mutex — Swoole coroutine mutex backed by Swoole\Coroutine\Channel(1).
    • Utopia\Lock\Lock\Semaphore — Swoole coroutine semaphore with a configurable permit count.
    • Utopia\Lock\Lock\Fileflock() based file lock (LOCK_EX or LOCK_SH), cooperates with Swoole's runtime hooks.
    • Utopia\Lock\Lock\Distributed — Redis SET NX EX lock with Lua-atomic release and refresh, fractional-second timeouts, optional logger.
    • Utopia\Lock\Exception base exception and Utopia\Lock\Exception\Contention thrown when withLock times out.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive