tourze/symfony-aop-lock-bundle
A Symfony bundle that brings attribute-driven, AOP-based locking to your services, letting you guard methods with a simple annotation instead of hand-written lock code. It integrates with Symfony's Lock component to prevent concurrent execution and keep shared resources safe.
SETNX/semaphore code with declarative, attribute-driven method locking via AOP. The PM decision it informs: do we own lock semantics in-house, or adopt a small vendor bundle and accept its opinions on TTL, blocking, and failure behavior?tourze/* family, not a Laravel package. For a Laravel codebase this is an adapter decision (service provider wrapper, attribute discovery, container decoration, proxy generation), not a drop-in install — that cost belongs in the estimate.Consider it when:
Look elsewhere when:
To executives: A small, cheap dependency that prevents duplicate charges, double bookings, and overlapping jobs by declaring a lock on a method instead of writing locking code everywhere. Cost is low; risk is that it is early-stage (v1.0.1), from a single publisher, and shipped with no changelog. Recommendation: a short timeboxed pilot behind a feature flag on one non-critical workflow — not a platform-wide standard.
To engineering: Value is declarative, reviewable locking via attributes and AOP, removing copy-pasted lock/retry blocks. Caveats to validate before adoption: it is a Symfony bundle (Laravel needs an adapter), AOP proxying can break on final classes and private/internal calls, and 1.0.1 documents nothing — read the diff. Verify the lock store, TTL/lease defaults, whether acquisition failure throws or silently proceeds, and reentrancy. Wrap it behind an internal locking interface so it stays swappable, and pin the exact version.
How can I help you explore Laravel packages today?