@@ -560,14 +560,14 @@ can also :ref:`disable CSRF protection on individual forms <form-csrf-customizat
560
560
.. configuration-block ::
561
561
562
562
.. code-block :: yaml
563
-
563
+
564
564
# config/packages/framework.yaml
565
565
framework :
566
566
# ...
567
567
csrf_protection : true
568
-
568
+
569
569
.. code-block :: xml
570
-
570
+
571
571
<!-- config/packages/framework.xml -->
572
572
<?xml version =" 1.0" encoding =" UTF-8" ?>
573
573
<container xmlns =" http://symfony.com/schema/dic/services"
@@ -581,9 +581,9 @@ can also :ref:`disable CSRF protection on individual forms <form-csrf-customizat
581
581
<framework : csrf-protection enabled =" true" />
582
582
</framework : config >
583
583
</container >
584
-
584
+
585
585
.. code-block :: php
586
-
586
+
587
587
// config/packages/framework.php
588
588
use Symfony\Config\FrameworkConfig;
589
589
return static function (FrameworkConfig $framework) {
@@ -3031,7 +3031,8 @@ resources
3031
3031
3032
3032
**type **: ``array ``
3033
3033
3034
- A list of lock stores to be created by the framework extension.
3034
+ A map of lock stores to be created by the framework extension, with
3035
+ the name as key and DSN as value:
3035
3036
3036
3037
.. configuration-block ::
3037
3038
@@ -3054,7 +3055,7 @@ A list of lock stores to be created by the framework extension.
3054
3055
3055
3056
<framework : config >
3056
3057
<framework : lock >
3057
- <framework : resource >%env(LOCK_DSN)%</framework : resource >
3058
+ <framework : resource name = " default " >%env(LOCK_DSN)%</framework : resource >
3058
3059
</framework : lock >
3059
3060
</framework : config >
3060
3061
</container >
@@ -3082,6 +3083,82 @@ name
3082
3083
3083
3084
Name of the lock you want to create.
3084
3085
3086
+ semaphore
3087
+ ~~~~~~~~~
3088
+
3089
+ .. versionadded :: 6.1
3090
+
3091
+ The ``semaphore `` option was introduced in Symfony 6.1.
3092
+
3093
+ **type **: ``string `` | ``array ``
3094
+
3095
+ The default semaphore adapter. Store's DSN are also allowed.
3096
+
3097
+ .. _reference-semaphore-enabled :
3098
+
3099
+ enabled
3100
+ .......
3101
+
3102
+ **type **: ``boolean `` **default **: ``true ``
3103
+
3104
+ Whether to enable the support for semaphore or not. This setting is
3105
+ automatically set to ``true `` when one of the child settings is configured.
3106
+
3107
+ .. _reference-semaphore-resources :
3108
+
3109
+ resources
3110
+ .........
3111
+
3112
+ **type **: ``array ``
3113
+
3114
+ A map of semaphore stores to be created by the framework extension, with
3115
+ the name as key and DSN as value:
3116
+
3117
+ .. configuration-block ::
3118
+
3119
+ .. code-block :: yaml
3120
+
3121
+ # config/packages/semaphore.yaml
3122
+ framework :
3123
+ semaphore : ' %env(SEMAPHORE_DSN)%'
3124
+
3125
+ .. code-block :: xml
3126
+
3127
+ <!-- config/packages/semaphore.xml -->
3128
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
3129
+ <container xmlns =" http://symfony.com/schema/dic/services"
3130
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3131
+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
3132
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
3133
+ https://symfony.com/schema/dic/services/services-1.0.xsd
3134
+ http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
3135
+
3136
+ <framework : config >
3137
+ <framework : semaphore >
3138
+ <framework : resource name =" default" >%env(SEMAPHORE_DSN)%</framework : resource >
3139
+ </framework : semaphore >
3140
+ </framework : config >
3141
+ </container >
3142
+
3143
+ .. code-block :: php
3144
+
3145
+ // config/packages/semaphore.php
3146
+ use Symfony\Config\FrameworkConfig;
3147
+
3148
+ return static function (FrameworkConfig $framework) {
3149
+ $framework->semaphore()
3150
+ ->resource('default', ['%env(SEMAPHORE_DSN)%']);
3151
+ };
3152
+
3153
+ .. _reference-semaphore-resources-name :
3154
+
3155
+ name
3156
+ """"
3157
+
3158
+ **type **: ``prototype ``
3159
+
3160
+ Name of the semaphore you want to create.
3161
+
3085
3162
mailer
3086
3163
~~~~~~
3087
3164
0 commit comments