Skip to content

Commit 0ccc03e

Browse files
committed
Merge pull request #300
2 parents b863ddc + 5518dc9 commit 0ccc03e

10 files changed

+26
-58
lines changed

source/includes/apiargs-MongoDBCollection-method-aggregate-option.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@ source:
4949
source:
5050
file: apiargs-MongoDBCollection-common-option.yaml
5151
ref: typeMap
52-
post: |
53-
.. note::
54-
55-
This is not supported for inline aggregation results (i.e. ``useCursor``
56-
option is ``false`` or the server version is < 2.6).
5752
---
5853
arg_name: option
5954
name: useCursor

source/includes/apiargs-MongoDBCollection-method-findOneAndDelete-option.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ source:
1414
file: apiargs-common-option.yaml
1515
ref: maxTimeMS
1616
---
17+
source:
18+
file: apiargs-MongoDBCollection-common-option.yaml
19+
ref: typeMap
20+
post: |
21+
This will be used for the returned result document.
22+
---
1723
source:
1824
file: apiargs-MongoDBCollection-common-option.yaml
1925
ref: writeConcern

source/includes/apiargs-MongoDBCollection-method-findOneAndReplace-option.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ interface: phpmethod
3131
operation: ~
3232
optional: true
3333
---
34+
source:
35+
file: apiargs-MongoDBCollection-common-option.yaml
36+
ref: typeMap
37+
post: |
38+
This will be used for the returned result document.
39+
---
3440
source:
3541
file: apiargs-MongoDBCollection-common-option.yaml
3642
ref: upsert

source/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-option.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ interface: phpmethod
3131
operation: ~
3232
optional: true
3333
---
34+
source:
35+
file: apiargs-MongoDBCollection-common-option.yaml
36+
ref: typeMap
37+
post: |
38+
This will be used for the returned result document.
39+
---
3440
source:
3541
file: apiargs-MongoDBCollection-common-option.yaml
3642
ref: upsert

source/includes/extracts-bson-deserialization-base.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

source/includes/extracts-bson-deserialization.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

source/reference/method/MongoDBCollection-aggregate.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,6 @@ MongoDB server version and whether the ``useCursor`` option is specified. If
5858
``result`` array from the command response document. In both cases, the return
5959
value will be :php:`Traversable <traversable>`.
6060

61-
.. note::
62-
63-
BSON deserialization of inline aggregation results (i.e. not using a command
64-
cursor) does not yet support a ``typeMap`` option. Classes implementing
65-
:php:`MongoDB\\BSON\\Persistable <mongodb-bson-persistable>` will still be
66-
deserialized according to the
67-
:php:`Persistence <mongodb.persistence.deserialization>` specification.
68-
6961
.. todo: add examples
7062

7163
See Also

source/reference/method/MongoDBCollection-findOneAndDelete.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,11 @@ Definition
2929

3030
.. include:: /includes/apiargs/MongoDBCollection-method-findOneAndDelete-option.rst
3131

32-
.. include:: /includes/extracts/bson-deserialization-findOneAndDelete.rst
33-
3432
Return Values
3533
-------------
3634

37-
An object for the document that was deleted, or ``null`` if no document matched
38-
the query.
35+
An array or object for the document that was deleted, or ``null`` if no document
36+
matched the query. The return type will depend on the ``typeMap`` option.
3937

4038
Errors/Exceptions
4139
-----------------

source/reference/method/MongoDBCollection-findOneAndReplace.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,13 @@ Definition
2929

3030
.. include:: /includes/apiargs/MongoDBCollection-method-findOneAndReplace-option.rst
3131

32-
.. include:: /includes/extracts/bson-deserialization-findOneAndReplace.rst
33-
3432
Return Values
3533
-------------
3634

37-
An object for either the original or the replaced document, depending on the
38-
specified value of the ``returnDocument`` option. By default, the original
35+
An array object for either the original or the replaced document, depending on
36+
the specified value of the ``returnDocument`` option. By default, the original
3937
document is returned. If no document matched the query, ``null`` is returned.
38+
The return type will depend on the ``typeMap`` option.
4039

4140
Errors/Exceptions
4241
-----------------

source/reference/method/MongoDBCollection-findOneAndUpdate.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,13 @@ Definition
2929

3030
.. include:: /includes/apiargs/MongoDBCollection-method-findOneAndUpdate-option.rst
3131

32-
.. include:: /includes/extracts/bson-deserialization-findOneAndUpdate.rst
33-
3432
Return Values
3533
-------------
3634

37-
An object for either the original or the updated document, depending on the
38-
specified value of the ``returnDocument`` option. By default, the original
35+
An array or object for either the original or the updated document, depending on
36+
the specified value of the ``returnDocument`` option. By default, the original
3937
document is returned. If no document matched the query, ``null`` is returned.
38+
The return type will depend on the ``typeMap`` option.
4039

4140
Errors/Exceptions
4241
-----------------

0 commit comments

Comments
 (0)