#111404Use symfony/lock for locking and deprecate the legacy locking API
Description
TYPO3’s own locking API (LockFactory, LockingStrategyInterface and the File, Semaphore and Simple lock strategies) only works on a single host. Page generation and image processing locks therefore have no effect across several web nodes or containers, the file strategy fails on NFS (#72074), and locks never expire when a worker crashes.
symfony/lock covers the same ground with a well maintained set of stores (flock, semaphore, Redis, Memcached, combined stores, …), lock expiration and non-blocking acquisition.
This change:
- requires symfony/lock and provides Symfony’s LockFactory as a service, configured through $GLOBALS[‘TYPO3_CONF_VARS’][‘SYS’][‘locking’][‘store’] (a store DSN, defaulting to a file lock in var/lock as before) with optional per-scope overrides in [‘SYS’][‘locking’][‘stores’]
- rewrites ResourceMutex (page generation, image processing) on top of it, which replaces the access lock plus polling loop with a single lock
- migrates the remaining Core callers (language pack states, CLI user creation, mbox transport, rotating file log writer)
- deprecates LockFactory, LockingStrategyInterface, the three strategies, their exceptions and the [‘SYS’][‘locking’][‘strategies’] configuration
Database backed stores, which need a lock table, are not part of this change.
Reviews 1
Related issues 1
History 12
-
Gerrit Code Review pushed patch set 1 for main to change 97533 status
NewUnder Review <span data-processor="relativetime" data-value="2026-11-11T08:59:00+00:00" > 11/11/26, 08:59 </span> -
Benni Mack changed Related to #72074 <span data-processor="relativetime" data-value="2026-11-16T10:18:02+00:00" > 11/16/26, 10:18 </span>