Skip to content

Commit 9a0e1cb

Browse files
authored
DOCSP-48606: builderEncoder Database (#232)
* DOCSP-48606: builderEncoder Database * wip * AS PR fixes 1 * JM small fix
1 parent 32d2e4c commit 9a0e1cb

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

source/reference/method/MongoDBCollection-withOptions.txt

+10-2
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

+8
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
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

+7
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,13 @@ 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 following methods:
164+
165+
- :phpmethod:`Database constructor <MongoDB\Database::__construct()>`
166+
- :phpmethod:`MongoDB\Database::withOptions()`
167+
- :phpmethod:`Collection constructor <MongoDB\Collection::__construct()>`
168+
- :phpmethod:`MongoDB\Collection::withOptions()`
169+
163170
For more information about the changes in this version, see the
164171
:github:`v1.21 release notes
165172
</mongodb/mongo-php-library/releases/tag/1.21.0>` on GitHub.

0 commit comments

Comments
 (0)