@@ -141,6 +141,12 @@ Configuration
141141* `http_method_override `_
142142* `ide `_
143143*:ref: `lock <reference-lock >`
144+
145+ *:ref: `enabled <reference-lock-enabled >`
146+ *:ref: `resources <reference-lock-resources >`
147+
148+ *:ref: `name <reference-lock-resources-name >`
149+
144150* `php_errors `_
145151
146152 * `log `_
@@ -217,7 +223,7 @@ Configuration
217223 * `engines `_
218224 *:ref: `form <reference-templating-form >`
219225
220- * `resources `_
226+ *:ref: `resources < reference-templating-form-resources >`
221227
222228 * `loaders `_
223229
@@ -1948,6 +1954,8 @@ templating
19481954form
19491955....
19501956
1957+ .. _reference-templating-form-resources :
1958+
19511959resources
19521960"""""""""
19531961
@@ -2726,11 +2734,131 @@ example, when warming caches offline).
27262734lock
27272735~~~~
27282736
2729- **type **: ``string ``
2737+ **type **: ``string `` | `` array ``
27302738
27312739The default lock adapter. If not defined, the value is set to ``semaphore `` when
27322740available, or to ``flock `` otherwise. Store's DSN are also allowed.
27332741
2742+ .. _reference-lock-enabled :
2743+
2744+ enabled
2745+ .......
2746+
2747+ **type **: ``boolean `` **default **: ``true ``
2748+
2749+ Whether to enable the support for lock or not. This setting is
2750+ automatically set to ``true `` when one of the child settings is configured.
2751+
2752+ .. _reference-lock-resources :
2753+
2754+ resources
2755+ .........
2756+
2757+ **type **: ``array ``
2758+
2759+ A list of lock stores to be created by the framework extension.
2760+
2761+ ..configuration-block ::
2762+
2763+ ..code-block ::yaml
2764+
2765+ # app/config/config.yml
2766+ framework :
2767+ # these are all the supported lock stores
2768+ lock :~
2769+ lock :' flock'
2770+ lock :' semaphore'
2771+ lock :' memcached://m1.docker'
2772+ lock :['memcached://m1.docker', 'memcached://m2.docker']
2773+ lock :' redis://r1.docker'
2774+ lock :['redis://r1.docker', 'redis://r2.docker']
2775+ lock :' %env(MEMCACHED_OR_REDIS_URL)%'
2776+
2777+ # named locks
2778+ lock :
2779+ invoice :['redis://r1.docker', 'redis://r2.docker']
2780+ report :' semaphore'
2781+
2782+ ..code-block ::xml
2783+
2784+ <!-- app/config/config.xml-->
2785+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2786+ <container xmlns =" http://symfony.com/schema/dic/services"
2787+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
2788+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
2789+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
2790+ https://symfony.com/schema/dic/services/services-1.0.xsd
2791+ http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
2792+
2793+ <framework : config >
2794+ <framework : lock >
2795+ <!-- these are all the supported lock stores-->
2796+ <framework : resource >flock</framework : resource >
2797+
2798+ <framework : resource >semaphore</framework : resource >
2799+
2800+ <framework : resource >memcached://m1.docker</framework : resource >
2801+
2802+ <framework : resource >memcached://m1.docker</framework : resource >
2803+ <framework : resource >memcached://m2.docker</framework : resource >
2804+
2805+ <framework : resource >redis://r1.docker</framework : resource >
2806+
2807+ <framework : resource >redis://r1.docker</framework : resource >
2808+ <framework : resource >redis://r2.docker</framework : resource >
2809+
2810+ <framework : resource >%env(REDIS_URL)%</framework : resource >
2811+
2812+ <!-- named locks-->
2813+ <framework : resource name =" invoice" >redis://r1.docker</framework : resource >
2814+ <framework : resource name =" invoice" >redis://r2.docker</framework : resource >
2815+ <framework : resource name =" report" >semaphore</framework : resource >
2816+ </framework : lock >
2817+ </framework : config >
2818+ </container >
2819+
2820+ ..code-block ::php
2821+
2822+ // app/config/config.php
2823+ $container->loadFromExtension('framework', [
2824+ // these are all the supported lock stores
2825+ 'lock' => null,
2826+ 'lock' => 'flock',
2827+ 'lock' => 'semaphore',
2828+ 'lock' => 'memcached://m1.docker',
2829+ 'lock' => ['memcached://m1.docker', 'memcached://m2.docker'],
2830+ 'lock' => 'redis://r1.docker',
2831+ 'lock' => ['redis://r1.docker', 'redis://r2.docker'],
2832+ 'lock' => '%env(MEMCACHED_OR_REDIS_URL)%',
2833+
2834+ // named locks
2835+ 'lock' => [
2836+ 'invoice' => ['redis://r1.docker', 'redis://r2.docker'],
2837+ 'report' => 'semaphore',
2838+ ],
2839+ ]);
2840+
2841+ .. _reference-lock-resources-name :
2842+
2843+ name
2844+ """"
2845+
2846+ **type **: ``prototype ``
2847+
2848+ Name of the lock you want to create.
2849+
2850+ ..tip ::
2851+
2852+ If you want to use the `RetryTillSaveStore ` for:ref: `non-blocking locks <lock-blocking-locks >`,
2853+ you can do it by:doc: `decorating the store </service_container/service_decoration >` service:
2854+
2855+ ..code-block ::yaml
2856+
2857+ lock.invoice.retry_till_save.store :
2858+ class :Symfony\Component\Lock\Store\RetryTillSaveStore
2859+ decorates :lock.invoice.store
2860+ arguments :['@lock.invoice.retry.till.save.store.inner', 100, 50]
2861+
27342862 workflows
27352863~~~~~~~~~
27362864