diff --git a/source/reference/method/MongoDBCollection-withOptions.txt b/source/reference/method/MongoDBCollection-withOptions.txt index 1893b9db..f7077e03 100644 --- a/source/reference/method/MongoDBCollection-withOptions.txt +++ b/source/reference/method/MongoDBCollection-withOptions.txt @@ -34,9 +34,17 @@ Parameters - Type - Description + * - builderEncoder + - ``MongoDB\Codec\Encoder`` + - The encoder used to serialize native PHP types to BSON data in + query and aggregation options. If omitted, the ``Collection`` + instance uses the default encoder. + + .. versionadded:: 1.21 + * - codec - - MongoDB\\Codec\\DocumentCodec - - The default :doc:`codec ` to use for collection + - ``MongoDB\Codec\DocumentCodec`` + - The default :ref:`codec ` to use for collection operations. Defaults to the original collection's codec. .. versionadded:: 1.17 diff --git a/source/reference/method/MongoDBDatabase-withOptions.txt b/source/reference/method/MongoDBDatabase-withOptions.txt index 681c044d..160551c3 100644 --- a/source/reference/method/MongoDBDatabase-withOptions.txt +++ b/source/reference/method/MongoDBDatabase-withOptions.txt @@ -34,6 +34,14 @@ Parameters - Type - Description + * - builderEncoder + - ``MongoDB\Codec\Encoder`` + - The encoder used to serialize native PHP types to BSON data in + query and aggregation options. If omitted, the ``Database`` + instance uses the default encoder. + + .. versionadded:: 1.21 + * - readConcern - :php:`MongoDB\Driver\ReadConcern ` - The default read concern to use for database operations. Defaults to diff --git a/source/whats-new.txt b/source/whats-new.txt index 3965921a..3183d6a1 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -160,6 +160,13 @@ improvements, and fixes: change also allows you to set a sort order as an option when performing update and replace operations in a bulk operation. +- Adds the ``builderEncoder`` option to the following methods: + + - :phpmethod:`Database constructor ` + - :phpmethod:`MongoDB\Database::withOptions()` + - :phpmethod:`Collection constructor ` + - :phpmethod:`MongoDB\Collection::withOptions()` + For more information about the changes in this version, see the :github:`v1.21 release notes ` on GitHub.