Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Locker Laravel Package

alt-three/locker

Alt Three Locker is a simple feature flag package for Laravel, letting you define toggles in config and check them anywhere in your app. Enable or disable features globally or per user without redeploying, keeping risky changes behind safe, manageable switches.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for a concurrency primitive. Locker is a thin abstraction for acquiring/releasing named locks so only one process touches a resource at a time. The real decision it informs is whether we own that primitive or consume one — and the answer has shifted since this package peaked, because Laravel itself ships atomic locks (Cache::lock()), WithoutOverlapping job middleware, and onOneServer() scheduling.
  • Roadmap scoping for "safe concurrency" work. Our recurring problem statements — duplicate queued jobs, overlapping cron runs, double-charged payments, concurrent inventory decrements, duplicate webhook processing — are all lock-shaped. This package tells us the problem is well-understood and small; it does not tell us we need a dependency to solve it.
  • Dependency policy decisions. An archived repo with zero dependents and a final release in July 2020 is a data point for our "no unmaintained packages in the critical path" rule. It supports a standing decision: locking is infrastructure, and infrastructure should come from the framework or a maintained library, not a 78-star helper.
  • Buy-vs-extend for multi-driver support. If a future requirement demands locks across a driver the framework doesn't cover well (e.g., a specific DB engine, file-based fallback in constrained hosting), that's a genuine evaluation trigger — but it argues for symfony/lock or a bespoke ~150-line service, not resurrection of this package.
  • Use cases it maps to, for backlog framing: singleton scheduled tasks, idempotent webhook handlers, "one active export per tenant," migration/backfill guards, and coarse leader-election for background workers.

When to Consider This Package

Consider it only in narrow, legacy-shaped situations:

  • You are maintaining a Laravel < 5.6 application (or a fork) that lacks native atomic locks and you need a drop-in, driver-agnostic mutex today.
  • You have an existing codebase already depending on Locker's API and the cost of rewriting call sites exceeds the cost of vendoring/forking the source under MIT while you migrate.
  • You need a uniform lock interface across several cache/database backends and the framework's driver coverage genuinely doesn't fit — and you're willing to fork and own it.

Look elsewhere (or build natively) when:

  • You're on Laravel 5.6+. Cache::lock()->get() with block() and release() covers the same ground with first-party support, docs, and security patches. This alone disqualifies Locker for greenfield work.
  • You need correctness guarantees under failure — lock TTL, owner-token verification, safe release, retry/backoff. An archived package means no fixes for edge cases you will eventually hit.
  • You need maintenance assurances: no releases in ~5 years, no dependents, no active maintainer. That is an unbounded support liability for something in the critical path of payments or inventory.
  • You need PHP 8.x / modern Laravel compatibility, which is untested and unsupported here.
  • You want observability (lock contention metrics, hold-time histograms). Neither Locker nor the framework gives you this out of the box; plan to instrument it yourself.

How to Pitch It (Stakeholders)

Summary for executives and engineering leadership: Locker is a small MIT-licensed Laravel helper that prevents two processes from doing the same thing at once. The underlying need is real and recurring — duplicate job execution, overlapping scheduled tasks, and race conditions on shared records all cost us money and trust. But the package itself is archived, last released in July 2020, has no dependents, and has been functionally superseded by atomic locks built into Laravel since 5.6.

Recommendation: do not adopt. Standardize on framework-native locking (Cache::lock(), WithoutOverlapping, onOneServer()) backed by Redis, and treat Locker as prior art rather than a dependency. This costs us a small amount of internal design work and buys us first-party maintenance, security patching, and PHP 8 compatibility — the three things an archived repo cannot offer.

For engineering: the migration story is cheap. Locker's surface area is a lock manager with acquire/release semantics; replacing it is a handful of call sites moving to Cache::lock($key, $ttl)->block($wait, $callback). Budget roughly a day for a typical service, plus test coverage for the failure paths (lock expiry mid-work, release by a non-owner, Redis unavailability). If any team is currently on Locker, that migration should be scheduled before the next major framework upgrade, not after.

Risk if we adopt anyway: an unmaintained dependency in a correctness-critical path, no upstream fixes, and a future forced migration under time pressure. The only defensible reason to touch it is a legacy app pinned below Laravel 5.6 — and even then, fork and vendor it rather than depend on the upstream repo.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console