Skip to content

Commit f9e3fa2

Browse files
committed
DOCSP-48606: builderEncoder Database
1 parent 32d2e4c commit f9e3fa2

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

source/reference/method/MongoDBCollection-withOptions.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,17 @@ Parameters
3434
- Type
3535
- Description
3636

37+
* - builderEncoder
38+
- ``MongoDB\Codec\Encoder``
39+
- The encoder used to serialize native PHP types to BSON data in
40+
query and aggregation options. If omitted, the ``Collection``
41+
instance uses the default encoder.
42+
43+
.. versionadded:: 1.21
44+
3745
* - codec
38-
- MongoDB\\Codec\\DocumentCodec
39-
- The default :doc:`codec </data-formats/codecs>` to use for collection
46+
- ``MongoDB\Codec\DocumentCodec``
47+
- The default :ref:`codec <php-codecs>` to use for collection
4048
operations. Defaults to the original collection's codec.
4149

4250
.. versionadded:: 1.17

source/reference/method/MongoDBDatabase-withOptions.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ Parameters
3434
- Type
3535
- Description
3636

37+
* - builderEncoder
38+
- ``MongoDB\Codec\Encoder``
39+
- The encoder used to serialize native PHP types to BSON data in
40+
query and aggregation options. If omitted, the ``Database``
41+
instance uses the default encoder.
42+
43+
.. versionadded:: 1.21.1
44+
3745
* - readConcern
3846
- :php:`MongoDB\Driver\ReadConcern <class.mongodb-driver-readconcern>`
3947
- The default read concern to use for database operations. Defaults to

source/whats-new.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ improvements, and fixes:
160160
change also allows you to set a sort order as an option when performing
161161
update and replace operations in a bulk operation.
162162

163+
- Adds the ``builderEncoder`` option to the
164+
:phpmethod:`MongoDB\Database::withOptions()` and
165+
:phpmethod:`MongoDB\Collection::withOptions()` methods.
166+
163167
For more information about the changes in this version, see the
164168
:github:`v1.21 release notes
165169
</mongodb/mongo-php-library/releases/tag/1.21.0>` on GitHub.

0 commit comments

Comments
 (0)