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.
Architecture fit. Locker is a driver-based lock manager built in the Laravel idiom: a manager resolving pluggable drivers, a service provider, and a facade over the container. That makes it structurally easy to wire in. The problem is fit, not form — it implements a capability that has lived in the framework core since Laravel 5.6 (Illuminate\Cache\Lock, Cache::lock(), the LockProvider contract). On any Laravel ≥ 6 target, adopting Locker means maintaining a parallel implementation of a core primitive rather than filling a gap. Architectural duplication of a correctness-critical mechanism is a poor trade.
Integration feasibility. Composer-installable, MIT-licensed, small API surface, so the mechanical integration is trivial. The constraints are the issue: last release 2020-07-25, repo archived, so support almost certainly stops at PHP 7.x and Laravel 7/8. Expect composer require to resolve only inside a legacy constraint set, and treat any conflict as permanent — there is no "wait for a patch" option. Zero dependents on Packagist means effectively no field validation; we would be the only consumers, with no upstream issue history to lean on.
Technical risk. High, and concentrated in silence. Locking is a distributed-systems primitive where the failure is not a crash but a duplicate charge, a double-sent email, or a corrupted aggregate — bugs surface as data incidents, not exceptions. An unmaintained library gating that boundary is a standing liability. Compounding it, the "lock manager" abstraction can create false confidence: it presents uniform acquire/release semantics while the underlying driver (file, array) may be unsafe across multiple hosts. Secondary risk is ownership: no upstream to escalate to, so every defect becomes ours.
Key questions.
Cache::lock() behind the LockProvider contract already cover ~90% of our call sites?Stack fit. Viable only on a legacy Laravel (≈5.x–7.x) / PHP 7.x footprint. Run composer why-not alt-three/locker against each candidate app before any design work — that single command gates the entire decision. If the target is Laravel 8+, stop: the package is not the vehicle.
Migration path. Two directions, and the recommendation depends on which we are in:
LockService interface so driver and semantics stay swappable without touching call sites.Compatibility. Verify four things concretely: composer.json PHP and illuminate/* constraints against the actual runtime; package auto-discovery support; driver coverage versus the backends we run (Redis vs database vs file); and whether the 2020 release targets the framework version in use. Because the repo is archived, any mismatch is a permanent condition, not a scheduling problem.
Sequencing.
Maintenance. Zero upstream. Archived plus a 2020-07-25 final release means no dependency bumps, no PHP 8.x fixes, no CVE response. The cost does not disappear; it converts into either a hard version ceiling on the application or a permanently owned internal fork. MIT makes forking clean and the codebase is small enough that a fork is bounded and plausible — but it becomes a standing line item, not a one-off task.
Support. No maintainers, no issue triage, no security channel. Escalation is internal-only. For a component on a correctness boundary, that fact outweighs both the star count and the code quality.
Scaling. All scaling characteristics belong to the driver, and the manager abstraction does not change any of the curves — it only selects among them. Redis gives good throughput but lock durability is bounded by Redis availability; failover or resharding can silently drop a held lock. Database locks are workable at low write rates and degrade under contention while adding load to the primary. File and array drivers are single-host only and invalid the moment we scale horizontally. Blocking acquires hold PHP-FPM workers, so contention converts directly into worker-pool exhaustion — a capacity-planning concern, not merely a locking one.
Failure modes. Enumerate these explicitly, because every one is silent:
Ramp-up. The API is small and Laravel-idiomatic; a mid-level engineer is productive in a day. The real ramp-up is conceptual — lease sizing, idempotency at the critical-section boundary, and failure-injection testing. Budget there, not for learning the package. Read the score profile (0.44 overall against 7.77 opportunity) as a signal that distributed locking is an unmet need in this stack, and address the need with native primitives rather than a six-year-dormant dependency.
How can I help you explore Laravel packages today?