@@ -87,6 +87,12 @@ Configuration
8787* `http_method_override `_
8888* `ide `_
8989*:ref: `lock <reference-lock >`
90+
91+ *:ref: `enabled <reference-lock-enabled >`
92+ *:ref: `resources <reference-lock-resources >`
93+
94+ *:ref: `name <reference-lock-resources-name >`
95+
9096* `php_errors `_
9197
9298 * `log `_
@@ -165,7 +171,7 @@ Configuration
165171 * `engines `_
166172 *:ref: `form <reference-templating-form >`
167173
168- * `resources `_
174+ *:ref: `resources < reference-templating-form-resources >`
169175
170176 * `hinclude_default_template `_
171177 * `loaders `_
@@ -1564,6 +1570,8 @@ is disabled. This can be either a template name or the content itself.
15641570form
15651571....
15661572
1573+ .. _reference-templating-form-resources :
1574+
15671575resources
15681576"""""""""
15691577
@@ -2235,11 +2243,131 @@ example, when warming caches offline).
22352243lock
22362244~~~~
22372245
2238- **type **: ``string ``
2246+ **type **: ``string `` | `` array ``
22392247
22402248The default lock adapter. If not defined, the value is set to ``semaphore `` when
22412249available, or to ``flock `` otherwise. Store's DSN are also allowed.
22422250
2251+ .. _reference-lock-enabled :
2252+
2253+ enabled
2254+ .......
2255+
2256+ **type **: ``boolean `` **default **: ``true ``
2257+
2258+ Whether to enable the support for lock or not. This setting is
2259+ automatically set to ``true `` when one of the child settings is configured.
2260+
2261+ .. _reference-lock-resources :
2262+
2263+ resources
2264+ .........
2265+
2266+ **type **: ``array ``
2267+
2268+ A list of lock stores to be created by the framework extension.
2269+
2270+ ..configuration-block ::
2271+
2272+ ..code-block ::yaml
2273+
2274+ # app/config/config.yml
2275+ framework :
2276+ # these are all the supported lock stores
2277+ lock :~
2278+ lock :' flock'
2279+ lock :' semaphore'
2280+ lock :' memcached://m1.docker'
2281+ lock :['memcached://m1.docker', 'memcached://m2.docker']
2282+ lock :' redis://r1.docker'
2283+ lock :['redis://r1.docker', 'redis://r2.docker']
2284+ lock :' %env(MEMCACHED_OR_REDIS_URL)%'
2285+
2286+ # named locks
2287+ lock :
2288+ invoice :['redis://r1.docker', 'redis://r2.docker']
2289+ report :' semaphore'
2290+
2291+ ..code-block ::xml
2292+
2293+ <!-- app/config/config.xml-->
2294+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2295+ <container xmlns =" http://symfony.com/schema/dic/services"
2296+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
2297+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
2298+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
2299+ https://symfony.com/schema/dic/services/services-1.0.xsd
2300+ http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
2301+
2302+ <framework : config >
2303+ <framework : lock >
2304+ <!-- these are all the supported lock stores-->
2305+ <framework : resource >flock</framework : resource >
2306+
2307+ <framework : resource >semaphore</framework : resource >
2308+
2309+ <framework : resource >memcached://m1.docker</framework : resource >
2310+
2311+ <framework : resource >memcached://m1.docker</framework : resource >
2312+ <framework : resource >memcached://m2.docker</framework : resource >
2313+
2314+ <framework : resource >redis://r1.docker</framework : resource >
2315+
2316+ <framework : resource >redis://r1.docker</framework : resource >
2317+ <framework : resource >redis://r2.docker</framework : resource >
2318+
2319+ <framework : resource >%env(REDIS_URL)%</framework : resource >
2320+
2321+ <!-- named locks-->
2322+ <framework : resource name =" invoice" >redis://r1.docker</framework : resource >
2323+ <framework : resource name =" invoice" >redis://r2.docker</framework : resource >
2324+ <framework : resource name =" report" >semaphore</framework : resource >
2325+ </framework : lock >
2326+ </framework : config >
2327+ </container >
2328+
2329+ ..code-block ::php
2330+
2331+ // app/config/config.php
2332+ $container->loadFromExtension('framework', [
2333+ // these are all the supported lock stores
2334+ 'lock' => null,
2335+ 'lock' => 'flock',
2336+ 'lock' => 'semaphore',
2337+ 'lock' => 'memcached://m1.docker',
2338+ 'lock' => ['memcached://m1.docker', 'memcached://m2.docker'],
2339+ 'lock' => 'redis://r1.docker',
2340+ 'lock' => ['redis://r1.docker', 'redis://r2.docker'],
2341+ 'lock' => '%env(MEMCACHED_OR_REDIS_URL)%',
2342+
2343+ // named locks
2344+ 'lock' => [
2345+ 'invoice' => ['redis://r1.docker', 'redis://r2.docker'],
2346+ 'report' => 'semaphore',
2347+ ],
2348+ ]);
2349+
2350+ .. _reference-lock-resources-name :
2351+
2352+ name
2353+ """"
2354+
2355+ **type **: ``prototype ``
2356+
2357+ Name of the lock you want to create.
2358+
2359+ ..tip ::
2360+
2361+ If you want to use the `RetryTillSaveStore ` for:ref: `non-blocking locks <lock-blocking-locks >`,
2362+ you can do it by:doc: `decorating the store </service_container/service_decoration >` service:
2363+
2364+ ..code-block ::yaml
2365+
2366+ lock.invoice.retry_till_save.store :
2367+ class :Symfony\Component\Lock\Store\RetryTillSaveStore
2368+ decorates :lock.invoice.store
2369+ arguments :['@lock.invoice.retry.till.save.store.inner', 100, 50]
2370+
22432371 workflows
22442372~~~~~~~~~
22452373