Promising library of the month: symfony/lock

Having worked with pessimistic and optimistic locking solutions from my Java days, I can appreciate all too well the challenges that a PHP-based application has in providing mutual exclusion capabilities.

Having tried a few implementations with varying degrees of success, I'm feeling optimistic about the symfony/lock component; removed from 3.3 for more polishing but reintroduced in 3.4 (and, by extension, Symfony 4.0).

While it doesn't strictly implement RedLock (our distributed pessimistic locking algorithm of choice) utilisation of the Decorator pattern to build in this support is most certainly an option.