ixarlie/mutex-bundle
Provides named mutex locks for PHP applications, letting you guard critical sections and prevent race conditions. A simple API to acquire, wait for, and release locks around shared resources, background jobs, or scheduled tasks so only one process runs at a time.
Architecture fit
*Bundle classes or DependencyInjection/Extension files. Release 3.0.0 reinforces this: the sole change is a "Symfony Package Upgrade," i.e. the maintenance effort in this release went entirely into the Symfony wrapper, which we would not use.ixarlie/mutex) plus its storage adapters (Redis, MySQL GET_LOCK, PostgreSQL advisory locks, flock, semaphore). The bundle is packaging glue around that core, and 3.0.0 does not appear to have touched the core.Cache::lock() / Illuminate\Contracts\Cache\LockProvider covers the same ground with first-party support.Integration feasibility
MutexFactory/adapter as a singleton, publish config as config/mutex.php, and expose a thin facade or injectable contract. Estimated effort remains 1–3 engineering days for a spike + wrapper, not a drop-in install.Ixarlie\MutexBundle\* classes; couple only to the core library interfaces so the Symfony wrapper can be dropped or swapped later. The 3.0.0 major bump is a concrete example of why: we get breakage signal from a component we never run.dependency-injection, config, http-kernel). Laravel pins its own ranges of those same components, so a version conflict on install is now more likely, not less — verify with composer why-not and confirm the core ixarlie/mutex release line we intend to use has no coupling to Symfony 7.x.Technical risk
2.1.0...3.0.0 diff before pinning anything.ixarlie/mutex directly and pinning it, so Symfony upgrades upstream cannot force a rewrite of our wrapper.Key questions
Cache::lock() that justifies a third-party mutex? (DB-only locking? Postgres advisory locks? Cross-language interop?)ixarlie/mutex library framework-agnostic and stable enough to use without the Symfony bundle — and which core version line should we pin so that 3.x-style Symfony churn cannot reach us?Stack fit
ixarlie/mutex (and only the specific adapter we need, e.g. the Postgres or MySQL adapter), not mutex-bundle, and explicitly do not track the bundle's 3.x line. Note in the decision record that 3.0.0 exists and was evaluated and rejected as irrelevant to a Laravel runtime.App\Contracts\DistributedMutex) so the implementation is replaceable by Cache::lock() or a future in-house driver without touching call sites.Cache::lock(); use the mutex library only for the DB-lock path. This keeps the third-party surface to one adapter.Migration path
composer.json. Explicitly test composer require ixarlie/mutex-bundle:^3.0 in a throwaway branch only to record the conflict surface — that result is the evidence for the "bundle, not library" decision.Compatibility
GET_LOCK semantics differ across versions; Postgres advisory locks require session affinity).psr/log, psr/cache) — if so, binding is trivial.Sequencing
Maintenance
Support
Scaling
GET_LOCK, Postgres advisory) consume connections and can serialize hot paths. Model expected concurrency per lock key before broad rollout.Failure modes
GET_LOCK and Postgres advisory locks are session-bound; connection recycling can release a lock mid-critical-section. High-risk in pooled/worker environments.Ramp-up
How can I help you explore Laravel packages today?