Skip to content

Commit 245cd27

Browse files
committed
DOCSP-48606: builderEncoder Database (#232)
* DOCSP-48606: builderEncoder Database * wip * AS PR fixes 1 * JM small fix (cherry picked from commit 9a0e1cb)
1 parent 095d59c commit 245cd27

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
@@ -35,9 +35,17 @@ Parameters
3535
- Type
3636
- Description
3737

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

4351
.. versionadded:: 1.17

source/reference/method/MongoDBDatabase-withOptions.txt

+8
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ Parameters
3535
- Type
3636
- Description
3737

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

source/whats-new.txt

+7
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ improvements, and fixes:
6464
change also allows you to set a sort order as an option when performing
6565
update and replace operations in a bulk operation.
6666

67+
- Adds the ``builderEncoder`` option to the following methods:
68+
69+
- :phpmethod:`Database constructor <MongoDB\Database::__construct()>`
70+
- :phpmethod:`MongoDB\Database::withOptions()`
71+
- :phpmethod:`Collection constructor <MongoDB\Collection::__construct()>`
72+
- :phpmethod:`MongoDB\Collection::withOptions()`
73+
6774
For more information about the changes in this version, see the
6875
:github:`v1.21 release notes
6976
</mongodb/mongo-php-library/releases/tag/1.21.0>` on GitHub.

0 commit comments

Comments
 (0)