From a3c2a8d84a9e9b6f8434775cace41a7ab7187279 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Thu, 6 Jul 2023 13:37:45 +0200 Subject: [PATCH] [Lock] Mention `gcProbability` option and deprecation --- components/lock.rst | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/components/lock.rst b/components/lock.rst index 79e14c33536..31a9baea334 100644 --- a/components/lock.rst +++ b/components/lock.rst @@ -460,7 +460,7 @@ avoid stalled locks:: $mongo = 'mongodb://localhost/database?collection=lock'; $options = [ - 'gcProbablity' => 0.001, + 'gcProbability' => 0.001, 'database' => 'myapp', 'collection' => 'lock', 'uriOptions' => [], @@ -470,16 +470,22 @@ avoid stalled locks:: The ``MongoDbStore`` takes the following ``$options`` (depending on the first parameter type): -============= ================================================================================================ -Option Description -============= ================================================================================================ -gcProbablity Should a TTL Index be created expressed as a probability from 0.0 to 1.0 (Defaults to ``0.001``) +============== ================================================================================================ +Option Description +============== ================================================================================================ +gcProbability Should a TTL Index be created expressed as a probability from 0.0 to 1.0 (Defaults to ``0.001``) +gcProbablity Same as ``gcProbability``, see the deprecation note below database The name of the database collection The name of the collection uriOptions Array of URI options for `MongoDBClient::__construct`_ driverOptions Array of driver options for `MongoDBClient::__construct`_ ============= ================================================================================================ +.. deprecated:: 6.3 + + The "gcProbablity" option (notice the typo in its name) is deprecated since + Symfony 6.3, use the "gcProbability" option instead. + When the first parameter is a: ``MongoDB\Collection``: @@ -879,7 +885,7 @@ about `Expire Data from Collections by Setting TTL`_ in MongoDB. .. tip:: ``MongoDbStore`` will attempt to automatically create a TTL index. It's - recommended to set constructor option ``gcProbablity`` to ``0.0`` to + recommended to set constructor option ``gcProbability`` to ``0.0`` to disable this behavior if you have manually dealt with TTL index creation. .. caution::