Skip to content

Documentation updates for ext-mongodb 1.21 #4500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions language-snippets.ent
Original file line number Diff line number Diff line change
Expand Up @@ -3235,6 +3235,11 @@ local: {
<entry>string</entry>
<entry>Optional. Host with optional port.</entry>
</row>
<row>
<entry>delegated</entry>
<entry>bool</entry>
<entry>Optional. If true, this key should be decrypted by the KMIP server.</entry>
</row>
</tbody>
</tgroup>
</table>
Expand Down
25 changes: 25 additions & 0 deletions reference/mongodb/mongodb/driver/bulkwrite/update.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,25 @@
</entry>
<entry>&false;</entry>
</row>
<row>
<entry>sort</entry>
<entry><type class="union"><type>array</type><type>object</type></type></entry>
<entry>
<para>
Specify which document the operation updates if the query matches
multiple documents. The first document matched by the sort order
will be updated.
</para>
<para>
This option cannot be used if <literal>"multi"</literal> is &true;.
</para>
<para>
This option is available in MongoDB 8.0+ and will result in an
exception at execution time if specified for an older server
version.
</para>
</entry>
</row>
<row>
<entry>upsert</entry>
<entry><type>bool</type></entry>
Expand Down Expand Up @@ -145,6 +164,12 @@
</row>
</thead>
<tbody>
<row>
<entry>PECL mongodb 1.21.0</entry>
<entry>
Added the <literal>"sort"</literal> option.
</entry>
</row>
<row>
<entry>PECL mongodb 1.7.0</entry>
<entry>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@
</row>
</thead>
<tbody>
<row>
<entry>PECL mongodb 1.20.0</entry>
<entry>
Added <literal>"delegated"</literal> to the KMIP provider masterKey options.
</entry>
</row>
<row>
<entry>PECL mongodb 1.15.0</entry>
<entry>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,30 @@
<member>Throws <classname>MongoDB\Driver\Exception\RuntimeException</classname> on other errors.</member>
</simplelist>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>PECL mongodb 1.20.0</entry>
<entry>
Added <literal>"delegated"</literal> to the KMIP provider masterKey options.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<modifier>final</modifier> <modifier>public</modifier> <type>MongoDB\Driver\WriteResult</type><methodname>MongoDB\Driver\Manager::executeBulkWrite</methodname>
<methodparam><type>string</type><parameter>namespace</parameter></methodparam>
<methodparam><type>MongoDB\Driver\BulkWrite</type><parameter>bulk</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>array</type><type>MongoDB\Driver\WriteConcern</type><type>null</type></type><parameter>options</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>array</type><type>null</type></type><parameter>options</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Executes one or more write operations on the primary server.
Expand Down Expand Up @@ -92,6 +92,13 @@
</row>
</thead>
<tbody>
<row>
<entry>PECL mongodb 1.21.0</entry>
<entry>
Passing a <classname>MongoDB\Driver\WriteConcern</classname> object as
<parameter>options</parameter> is deprecated and will be removed in 2.0.
</entry>
</row>
<row>
<entry>PECL mongodb 1.4.4</entry>
<entry>
Expand Down
9 changes: 8 additions & 1 deletion reference/mongodb/mongodb/driver/manager/executecommand.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<modifier>final</modifier> <modifier>public</modifier> <type>MongoDB\Driver\Cursor</type><methodname>MongoDB\Driver\Manager::executeCommand</methodname>
<methodparam><type>string</type><parameter>db</parameter></methodparam>
<methodparam><type>MongoDB\Driver\Command</type><parameter>command</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>array</type><type>MongoDB\Driver\ReadPreference</type><type>null</type></type><parameter>options</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>array</type><type>null</type></type><parameter>options</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Selects a server according to the <literal>"readPreference"</literal> option
Expand Down Expand Up @@ -96,6 +96,13 @@
</row>
</thead>
<tbody>
<row>
<entry>PECL mongodb 1.21.0</entry>
<entry>
Passing a <classname>MongoDB\Driver\ReadPreference</classname> object as
<parameter>options</parameter> is deprecated and will be removed in 2.0.
</entry>
</row>
<row>
<entry>PECL mongodb 1.4.4</entry>
<entry>
Expand Down
9 changes: 8 additions & 1 deletion reference/mongodb/mongodb/driver/manager/executequery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<modifier>final</modifier> <modifier>public</modifier> <type>MongoDB\Driver\Cursor</type><methodname>MongoDB\Driver\Manager::executeQuery</methodname>
<methodparam><type>string</type><parameter>namespace</parameter></methodparam>
<methodparam><type>MongoDB\Driver\Query</type><parameter>query</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>array</type><type>MongoDB\Driver\ReadPreference</type><type>null</type></type><parameter>options</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>array</type><type>null</type></type><parameter>options</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Selects a server according to the <literal>"readPreference"</literal> option
Expand Down Expand Up @@ -83,6 +83,13 @@
</row>
</thead>
<tbody>
<row>
<entry>PECL mongodb 1.21.0</entry>
<entry>
Passing a <classname>MongoDB\Driver\ReadPreference</classname> object as
<parameter>options</parameter> is deprecated and will be removed in 2.0.
</entry>
</row>
<row>
<entry>PECL mongodb 1.4.0</entry>
<entry>
Expand Down
9 changes: 8 additions & 1 deletion reference/mongodb/mongodb/driver/server/executebulkwrite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<modifier>final</modifier> <modifier>public</modifier> <type>MongoDB\Driver\WriteResult</type><methodname>MongoDB\Driver\Server::executeBulkWrite</methodname>
<methodparam><type>string</type><parameter>namespace</parameter></methodparam>
<methodparam><type>MongoDB\Driver\BulkWrite</type><parameter>bulk</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>array</type><type>MongoDB\Driver\WriteConcern</type><type>null</type></type><parameter>options</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>array</type><type>null</type></type><parameter>options</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Executes one or more write operations on this server.
Expand Down Expand Up @@ -92,6 +92,13 @@
</row>
</thead>
<tbody>
<row>
<entry>PECL mongodb 1.21.0</entry>
<entry>
Passing a <classname>MongoDB\Driver\WriteConcern</classname> object as
<parameter>options</parameter> is deprecated and will be removed in 2.0.
</entry>
</row>
<row>
<entry>PECL mongodb 1.4.4</entry>
<entry>
Expand Down
9 changes: 8 additions & 1 deletion reference/mongodb/mongodb/driver/server/executecommand.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<modifier>final</modifier> <modifier>public</modifier> <type>MongoDB\Driver\Cursor</type><methodname>MongoDB\Driver\Server::executeCommand</methodname>
<methodparam><type>string</type><parameter>db</parameter></methodparam>
<methodparam><type>MongoDB\Driver\Command</type><parameter>command</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>array</type><type>MongoDB\Driver\ReadPreference</type><type>null</type></type><parameter>options</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>array</type><type>null</type></type><parameter>options</parameter><initializer>&null;</initializer></methodparam>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you should use the #[\Deprecated] attribute for parameter to indicate it is deprecated?

@TimWolla is this supported by the engine btw?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this supported by the engine btw?

Yes, it's used for all deprecations in PHP core to provide the message: php/php-src#14750

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I misread: No, it's not supported for parameters.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, we explicitly raise a deprecation notice in the 1.x branch: https://github.com/mongodb/mongo-php-driver/blob/v1.x/src/phongo_util.c#L95

</methodsynopsis>
<para>
Executes the command on this server.
Expand Down Expand Up @@ -96,6 +96,13 @@
</row>
</thead>
<tbody>
<row>
<entry>PECL mongodb 1.21.0</entry>
<entry>
Passing a <classname>MongoDB\Driver\ReadPreference</classname> object as
<parameter>options</parameter> is deprecated and will be removed in 2.0.
</entry>
</row>
<row>
<entry>PECL mongodb 1.4.4</entry>
<entry>
Expand Down
9 changes: 8 additions & 1 deletion reference/mongodb/mongodb/driver/server/executequery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<modifier>final</modifier> <modifier>public</modifier> <type>MongoDB\Driver\Cursor</type><methodname>MongoDB\Driver\Server::executeQuery</methodname>
<methodparam><type>string</type><parameter>namespace</parameter></methodparam>
<methodparam><type>MongoDB\Driver\Query</type><parameter>query</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>array</type><type>MongoDB\Driver\ReadPreference</type><type>null</type></type><parameter>options</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>array</type><type>null</type></type><parameter>options</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Executes the query on this server.
Expand Down Expand Up @@ -83,6 +83,13 @@
</row>
</thead>
<tbody>
<row>
<entry>PECL mongodb 1.21.0</entry>
<entry>
Passing a <classname>MongoDB\Driver\ReadPreference</classname> object as
<parameter>options</parameter> is deprecated and will be removed in 2.0.
</entry>
</row>
<row>
<entry>PECL mongodb 1.4.0</entry>
<entry>
Expand Down