Skip to content

Releases: hokoo/wp-lock

WP Lock 2.0.0

Choose a tag to compare

@hokoo hokoo released this 12 Sep 22:29
26d3a07

WP Lock 2.0.0 is a breaking reliability release focused on the database backend.

Highlights

  • Removed the bundled flock backend and WP_Lock_Backend_flock.
  • Made facade and backend ownership non-reentrant with explicit lifecycle exceptions.
  • Added bounded blocking waits (30 seconds by default) and bounded database-error retries.
  • Added automatic versioned schema upgrades, a lock_key index, and microsecond-precise TTL storage.
  • Added strict input/backend validation and preserved held state after failed release.
  • Expanded deterministic lifecycle, timeout, retry, migration, expiration, and fork/concurrency coverage.

Verification

  • 51 PHPUnit tests, 140 assertions.
  • 95.00% line coverage; CI enforces a 90% minimum.
  • GitHub Actions passes on PHP 7.4, 8.0, 8.1, 8.2, and 8.3 against WordPress 7.1 / MariaDB 10.11.

Migration

This release changes custom backend method signatures to return bool, removes the bundled flock class, and rejects repeated acquire/unmatched release calls with LogicException. Blocking acquisition can now return false at its deadline, while persistent database failures throw RuntimeException.

See README.md and CHANGELOG.md before upgrading.

v1.1

Choose a tag to compare

@hokoo hokoo released this 05 May 19:40
48b38cb

Ghost locks got fixed when they prevent acquiring a non-blocking new lock.
SQL queries got optimized.

v1.0

Choose a tag to compare

@hokoo hokoo released this 05 May 09:50
comments and readme