tourze/doctrine-entity-lock-bundle
A Symfony bundle that provides entity locking for Doctrine ORM, preventing concurrent modifications by locking records during critical operations. Integrates through Doctrine events and bundle configuration for safer transactional workflows.
SELECT ... FOR UPDATE in repositories, database advisory locks, or a distributed lock service (Redis, etc.). This package is thin configuration glue over Doctrine's lock modes, so the "buy" case rests on reduced bespoke code and consistent conventions, not on novel capability. Weigh it as a small integration cost against ongoing maintenance of in-house locking utilities.lockForUpdate()/sharedLock() inside transactions, not this.Consider it when:
Look elsewhere when:
Due diligence before any adoption decision: confirm active maintenance and release cadence, verify the license, check PHP and Doctrine version constraints against our matrix, and confirm which lock semantics we actually get and how they behave on our engine (MySQL vs PostgreSQL differ materially for FOR UPDATE and advisory locking). Then validate under real concurrency with integration tests — lock bugs do not surface in single-threaded test suites.
Executives: A small, low-cost library that reduces a class of expensive data-integrity bugs — double charges, oversold stock, silently lost updates — in high-contention flows. The cost is integration effort, not licensing exposure. The catch: it only applies if we're on the Doctrine stack, so this is a narrow bet rather than a broad platform investment.
Engineering: A thin configuration layer over Doctrine entity locking; value is consistency and less bespoke locking code, risk is low but the project is early (1.0.1) with opaque release documentation. Pin the version, and require concurrency tests before relying on it in money-touching paths.
Recommendation: Do not adopt on the basis of 1.0.1 — this release carries no decision-relevant information. Revisit only if we standardize on Doctrine and the package demonstrates a maintenance track record over the next few releases.
How can I help you explore Laravel packages today?