8000 minor #18524 [Lock] Mention `gcProbability` option and deprecation (a… · symfony/symfony-docs@1f5200f · GitHub
[go: up one dir, main page]

Skip to content

Commit 1f5200f

Browse files
committed
minor #18524 [Lock] Mention gcProbability option and deprecation (alexandre-daubois)
This PR was merged into the 6.3 branch. Discussion ---------- [Lock] Mention `gcProbability` option and deprecation First step to fix #18504, I'll take care of the 7.0 version when this one's merged 🙂 Commits ------- a3c2a8d [Lock] Mention `gcProbability` option and deprecation
2 parents fcdd668 + a3c2a8d commit 1f5200f

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

components/lock.rst

+12-6
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ avoid stalled locks::
460460

461461
$mongo = 'mongodb://localhost/database?collection=lock';
462462
$options = [
463-
'gcProbablity' => 0.001,
463+
'gcProbability' => 0.001,
464464
'database' => 'myapp',
465465
'collection' => 'lock',
466466
'uriOptions' => [],
@@ -470,16 +470,22 @@ avoid stalled locks::
470470

471471
The ``MongoDbStore`` takes the following ``$options`` (depending on the first parameter type):
472472

473-
============= ================================================================================================
474-
Option Description
475-
============= ================================================================================================
476-
gcProbablity Should a TTL Index be created expressed as a probability from 0.0 to 1.0 (Defaults to ``0.001``)
473+
============== ================================================================================================
474+
Option Description
475+
============== ================================================================================================
476+
gcProbability Should a TTL Index be created expressed as a probability from 0.0 to 1.0 (Defaults to ``0.001``)
477+
gcProbablity Same as ``gcProbability``, see the deprecation note below
477478
database The name of the database
478479
collection The name of the collection
479480
uriOptions Array of URI options for `MongoDBClient::__construct`_
480481
driverOptions Array of driver options for `MongoDBClient::__construct`_
481482
============= ================================================================================================
482483

484+
.. deprecated:: 6.3
485+
486+
The "gcProbablity" option (notice the typo in its name) is deprecated since
487+
Symfony 6.3, use the "gcProbability" option instead.
488+
483489
When the first parameter is a:
484490

485491
``MongoDB\Collection``:
@@ -879,7 +885,7 @@ about `Expire Data from Collections by Setting TTL`_ in MongoDB.
879885
.. tip::
880886

881887
``MongoDbStore`` will attempt to automatically create a TTL index. It's
882-
recommended to set constructor option ``gcProbablity`` to ``0.0`` to
888+
recommended to set constructor option ``gcProbability`` to ``0.0`` to
883889
disable this behavior if you have manually dealt with TTL index creation.
884890

885891
.. caution::

0 commit comments

Comments
 (0)
0