From fac5fa5392335837e3727f6f1db113bc5dca7574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Mon, 26 Oct 2026 23:52:04 +0100 Subject: [PATCH 1/2] [mongodb] Document stringOpts and String algorithm constants for ClientEncryption::encrypt() Add the stringOpts option and the ALGORITHM_STRING, QUERY_TYPE_PREFIX, QUERY_TYPE_SUFFIX and QUERY_TYPE_SUBSTRING constants. --- reference/mongodb/entities.mongodb.ent | 110 +++++++++++++++++- .../mongodb/driver/clientencryption.xml | 77 ++++++++++++ .../driver/clientencryption/encrypt.xml | 6 + 3 files changed, 189 insertions(+), 4 deletions(-) diff --git a/reference/mongodb/entities.mongodb.ent b/reference/mongodb/entities.mongodb.ent index 21abd79b9..9e62a64e0 100644 --- a/reference/mongodb/entities.mongodb.ent +++ b/reference/mongodb/entities.mongodb.ent @@ -541,6 +541,7 @@ local: { MongoDB\Driver\ClientEncryption::ALGORITHM_INDEXED MongoDB\Driver\ClientEncryption::ALGORITHM_UNINDEXED MongoDB\Driver\ClientEncryption::ALGORITHM_RANGE + MongoDB\Driver\ClientEncryption::ALGORITHM_STRING @@ -555,9 +556,10 @@ local: { This option only applies and may only be specified when algorithm is - MongoDB\Driver\ClientEncryption::ALGORITHM_INDEXED + MongoDB\Driver\ClientEncryption::ALGORITHM_INDEXED, + MongoDB\Driver\ClientEncryption::ALGORITHM_RANGE, or - MongoDB\Driver\ClientEncryption::ALGORITHM_RANGE. + MongoDB\Driver\ClientEncryption::ALGORITHM_STRING. @@ -595,12 +597,17 @@ local: { MongoDB\Driver\ClientEncryption::QUERY_TYPE_EQUALITY MongoDB\Driver\ClientEncryption::QUERY_TYPE_RANGE + MongoDB\Driver\ClientEncryption::QUERY_TYPE_PREFIX + MongoDB\Driver\ClientEncryption::QUERY_TYPE_SUFFIX + MongoDB\Driver\ClientEncryption::QUERY_TYPE_SUBSTRING This option only applies and may only be specified when algorithm is - MongoDB\Driver\ClientEncryption::ALGORITHM_INDEXED - or MongoDB\Driver\ClientEncryption::ALGORITHM_RANGE. + MongoDB\Driver\ClientEncryption::ALGORITHM_INDEXED, + MongoDB\Driver\ClientEncryption::ALGORITHM_RANGE, + or + MongoDB\Driver\ClientEncryption::ALGORITHM_STRING. @@ -669,6 +676,101 @@ local: { + + stringOpts + array + + + Index options for a queryable encryption field supporting "prefix", + "suffix", or "substring" queries. This option may only be specified + when algorithm is + MongoDB\Driver\ClientEncryption::ALGORITHM_STRING. + The options below must match the values set in the + encryptedFields of the target collection. Length + options are 32-bit integers. + + + + String index options + + + + Option + Type + Description + + + + + caseSensitive + bool + + Whether queries are case sensitive. If &false;, letter case is + ignored, so a query for "hello" also + matches "Hello". + + + + diacriticSensitive + bool + + Whether queries are diacritic sensitive. If &false;, diacritical + marks are ignored, so a query for "resume" + also matches "résumé". + + + + prefix + array + + + Options for "prefix" queries. Requires + algorithm to be + MongoDB\Driver\ClientEncryption::ALGORITHM_STRING. + + + strMinQueryLength (int) + strMaxQueryLength (int) + + + + + suffix + array + + + Options for "suffix" queries. Requires + algorithm to be + MongoDB\Driver\ClientEncryption::ALGORITHM_STRING. + + + strMinQueryLength (int) + strMaxQueryLength (int) + + + + + substring + array + + + Options for "substring" queries. Requires + algorithm to be + MongoDB\Driver\ClientEncryption::ALGORITHM_STRING. + + + strMaxLength (int) + strMinQueryLength (int) + strMaxQueryLength (int) + + + + + +
+
+
+
diff --git a/reference/mongodb/mongodb/driver/clientencryption.xml b/reference/mongodb/mongodb/driver/clientencryption.xml index fd10c73c3..b50d6c1ff 100644 --- a/reference/mongodb/mongodb/driver/clientencryption.xml +++ b/reference/mongodb/mongodb/driver/clientencryption.xml @@ -67,6 +67,12 @@ MongoDB\Driver\ClientEncryption::ALGORITHM_RANGE Range + + const + string + MongoDB\Driver\ClientEncryption::ALGORITHM_STRING + String + const string @@ -79,6 +85,24 @@ MongoDB\Driver\ClientEncryption::QUERY_TYPE_RANGE range + + const + string + MongoDB\Driver\ClientEncryption::QUERY_TYPE_PREFIX + prefix + + + const + string + MongoDB\Driver\ClientEncryption::QUERY_TYPE_SUFFIX + suffix + + + const + string + MongoDB\Driver\ClientEncryption::QUERY_TYPE_SUBSTRING + substring + &Methods; @@ -142,6 +166,18 @@ + + MongoDB\Driver\ClientEncryption::ALGORITHM_STRING + + + Specifies an algorithm for a string encrypted payload, which can be used + with queryable encryption for prefix, suffix, and substring queries. The + "stringOpts" encryption option configures the + supported queries. + + + + MongoDB\Driver\ClientEncryption::QUERY_TYPE_EQUALITY @@ -162,6 +198,36 @@ + + MongoDB\Driver\ClientEncryption::QUERY_TYPE_PREFIX + + + Specifies a prefix query type, which is used in conjunction with + MongoDB\Driver\ClientEncryption::ALGORITHM_STRING. + + + + + + MongoDB\Driver\ClientEncryption::QUERY_TYPE_SUFFIX + + + Specifies a suffix query type, which is used in conjunction with + MongoDB\Driver\ClientEncryption::ALGORITHM_STRING. + + + + + + MongoDB\Driver\ClientEncryption::QUERY_TYPE_SUBSTRING + + + Specifies a substring query type, which is used in conjunction with + MongoDB\Driver\ClientEncryption::ALGORITHM_STRING. + + + + @@ -177,6 +243,17 @@ + + PECL mongodb 2.6.0 + + + Added MongoDB\Driver\ClientEncryption::ALGORITHM_STRING, + MongoDB\Driver\ClientEncryption::QUERY_TYPE_PREFIX, + MongoDB\Driver\ClientEncryption::QUERY_TYPE_SUFFIX, + and MongoDB\Driver\ClientEncryption::QUERY_TYPE_SUBSTRING. + + + PECL mongodb 2.0.0 diff --git a/reference/mongodb/mongodb/driver/clientencryption/encrypt.xml b/reference/mongodb/mongodb/driver/clientencryption/encrypt.xml index ae4a466bf..535db41e5 100644 --- a/reference/mongodb/mongodb/driver/clientencryption/encrypt.xml +++ b/reference/mongodb/mongodb/driver/clientencryption/encrypt.xml @@ -62,6 +62,12 @@ + + PECL mongodb 2.6.0 + + Added the "stringOpts" option. + + PECL mongodb 1.20.0 From 29f1285f2ab663e9d61dfef697d67a9ec01de71a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Wed, 28 Oct 2026 16:44:17 +0100 Subject: [PATCH 2/2] [mongodb] Complete the changelog for versions 2.3 to 2.5 Document the changes released in 2.3.0, 2.4.0 and 2.5.0 that were not yet listed in the changelog tables: - 2.3.0: maxAdaptiveRetries and enableOverloadRetargeting URI options, and hedge deprecation in ReadPreference. - 2.4.0: object cloning for ReadConcern, ReadPreference and WriteConcern. - 2.5.0: server-supplied baseBackoffMS for SystemOverloadedError. --- .../mongodb/driver/manager/construct.xml | 20 +++++++++++++++++++ .../mongodb/mongodb/driver/readconcern.xml | 8 ++++++++ .../mongodb/mongodb/driver/readpreference.xml | 17 +++++++++++++++- .../mongodb/mongodb/driver/writeconcern.xml | 8 ++++++++ 4 files changed, 52 insertions(+), 1 deletion(-) diff --git a/reference/mongodb/mongodb/driver/manager/construct.xml b/reference/mongodb/mongodb/driver/manager/construct.xml index 8856e570b..37aa382a9 100644 --- a/reference/mongodb/mongodb/driver/manager/construct.xml +++ b/reference/mongodb/mongodb/driver/manager/construct.xml @@ -906,6 +906,26 @@ mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][ + + PECL mongodb 2.5.0 + + + If a SystemOverloadedError response includes a + positive baseBackoffMS value, the driver uses this + server-supplied base backoff in place of its default base backoff when + calculating the delay before a retry. + + + + + PECL mongodb 2.3.0 + + + Added the "maxAdaptiveRetries" and + "enableOverloadRetargeting" URI options. + + + PECL mongodb 2.0.0 diff --git a/reference/mongodb/mongodb/driver/readconcern.xml b/reference/mongodb/mongodb/driver/readconcern.xml index 141dc1f79..046eab987 100644 --- a/reference/mongodb/mongodb/driver/readconcern.xml +++ b/reference/mongodb/mongodb/driver/readconcern.xml @@ -260,6 +260,14 @@ + + PECL mongodb 2.4.0 + + + MongoDB\Driver\ReadConcern objects can now be cloned. + + + PECL mongodb 2.3.0 diff --git a/reference/mongodb/mongodb/driver/readpreference.xml b/reference/mongodb/mongodb/driver/readpreference.xml index 2f5c6498c..fc0d2f7d6 100644 --- a/reference/mongodb/mongodb/driver/readpreference.xml +++ b/reference/mongodb/mongodb/driver/readpreference.xml @@ -263,10 +263,25 @@ + + PECL mongodb 2.4.0 + + + MongoDB\Driver\ReadPreference objects can now be cloned. + + + PECL mongodb 2.3.0 - Added public readonly properties. + + Added public readonly properties. + + + Deprecated the "hedge" option and the + hedge property, as hedged reads are deprecated in + MongoDB 8.0. + diff --git a/reference/mongodb/mongodb/driver/writeconcern.xml b/reference/mongodb/mongodb/driver/writeconcern.xml index c1769066b..d126bb4c9 100644 --- a/reference/mongodb/mongodb/driver/writeconcern.xml +++ b/reference/mongodb/mongodb/driver/writeconcern.xml @@ -146,6 +146,14 @@ + + PECL mongodb 2.4.0 + + + MongoDB\Driver\WriteConcern objects can now be cloned. + + + PECL mongodb 2.3.0