Skip to content

Commit c2314d6

Browse files
committed
Revise docs for bypassDocumentValidation option
1 parent a284565 commit c2314d6

12 files changed

+55
-22
lines changed

docs/includes/apiargs-MongoDBCollection-common-option.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ type: boolean
44
description: |
55
If ``true``, allows the write operation to circumvent document level
66
validation. Defaults to ``false``.
7+
8+
This option is available in MongoDB 3.2+ and is ignored for older server
9+
versions, which do not support document level validation.
710
interface: phpmethod
811
operation: ~
912
optional: true

src/Operation/Aggregate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ class Aggregate implements Executable
6262
*
6363
* * batchSize (integer): The number of documents to return per batch.
6464
*
65-
* * bypassDocumentValidation (boolean): If true, allows the write to opt
66-
* out of document level validation. This only applies when the $out
65+
* * bypassDocumentValidation (boolean): If true, allows the write to
66+
* circumvent document level validation. This only applies when the $out
6767
* stage is specified.
6868
*
6969
* For servers < 3.2, this option is ignored as document level validation

src/Operation/BulkWrite.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,11 @@ class BulkWrite implements Executable
8686
*
8787
* Supported options for the bulk write operation:
8888
*
89-
* * bypassDocumentValidation (boolean): If true, allows the write to opt
90-
* out of document level validation.
89+
* * bypassDocumentValidation (boolean): If true, allows the write to
90+
* circumvent document level validation. The default is false.
91+
*
92+
* For servers < 3.2, this option is ignored as document level validation
93+
* is not available.
9194
*
9295
* * ordered (boolean): If true, when an insert fails, return without
9396
* performing the remaining writes. If false, when a write fails,

src/Operation/FindAndModify.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ class FindAndModify implements Executable
5454
* This is not supported for server versions < 3.4 and will result in an
5555
* exception at execution time if used.
5656
*
57-
* * bypassDocumentValidation (boolean): If true, allows the write to opt
58-
* out of document level validation.
57+
* * bypassDocumentValidation (boolean): If true, allows the write to
58+
* circumvent document level validation.
59+
*
60+
* For servers < 3.2, this option is ignored as document level validation
61+
* is not available.
5962
*
6063
* * fields (document): Limits the fields to return for the matching
6164
* document.

src/Operation/FindOneAndReplace.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ class FindOneAndReplace implements Executable
4141
*
4242
* Supported options:
4343
*
44-
* * bypassDocumentValidation (boolean): If true, allows the write to opt
45-
* out of document level validation.
44+
* * bypassDocumentValidation (boolean): If true, allows the write to
45+
* circumvent document level validation.
46+
*
47+
* For servers < 3.2, this option is ignored as document level validation
48+
* is not available.
4649
*
4750
* * collation (document): Collation specification.
4851
*

src/Operation/FindOneAndUpdate.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ class FindOneAndUpdate implements Executable
4141
*
4242
* Supported options:
4343
*
44-
* * bypassDocumentValidation (boolean): If true, allows the write to opt
45-
* out of document level validation.
44+
* * bypassDocumentValidation (boolean): If true, allows the write to
45+
* circumvent document level validation.
46+
*
47+
* For servers < 3.2, this option is ignored as document level validation
48+
* is not available.
4649
*
4750
* * collation (document): Collation specification.
4851
*

src/Operation/InsertMany.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,11 @@ class InsertMany implements Executable
4545
*
4646
* Supported options:
4747
*
48-
* * bypassDocumentValidation (boolean): If true, allows the write to opt
49-
* out of document level validation.
48+
* * bypassDocumentValidation (boolean): If true, allows the write to
49+
* circumvent document level validation.
50+
*
51+
* For servers < 3.2, this option is ignored as document level validation
52+
* is not available.
5053
*
5154
* * ordered (boolean): If true, when an insert fails, return without
5255
* performing the remaining writes. If false, when a write fails,

src/Operation/InsertOne.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,11 @@ class InsertOne implements Executable
4545
*
4646
* Supported options:
4747
*
48-
* * bypassDocumentValidation (boolean): If true, allows the write to opt
49-
* out of document level validation.
48+
* * bypassDocumentValidation (boolean): If true, allows the write to
49+
* circumvent document level validation.
50+
*
51+
* For servers < 3.2, this option is ignored as document level validation
52+
* is not available.
5053
*
5154
* * writeConcern (MongoDB\Driver\WriteConcern): Write concern.
5255
*

src/Operation/ReplaceOne.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ class ReplaceOne implements Executable
3939
*
4040
* Supported options:
4141
*
42-
* * bypassDocumentValidation (boolean): If true, allows the write to opt
43-
* out of document level validation.
42+
* * bypassDocumentValidation (boolean): If true, allows the write to
43+
* circumvent document level validation.
44+
*
45+
* For servers < 3.2, this option is ignored as document level validation
46+
* is not available.
4447
*
4548
* * collation (document): Collation specification.
4649
*

src/Operation/Update.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ class Update implements Executable
5050
*
5151
* Supported options:
5252
*
53-
* * bypassDocumentValidation (boolean): If true, allows the write to opt
54-
* out of document level validation.
53+
* * bypassDocumentValidation (boolean): If true, allows the write to
54+
* circumvent document level validation.
55+
*
56+
* For servers < 3.2, this option is ignored as document level validation
57+
* is not available.
5558
*
5659
* * collation (document): Collation specification.
5760
*

src/Operation/UpdateMany.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ class UpdateMany implements Executable
3939
*
4040
* Supported options:
4141
*
42-
* * bypassDocumentValidation (boolean): If true, allows the write to opt
43-
* out of document level validation.
42+
* * bypassDocumentValidation (boolean): If true, allows the write to
43+
* circumvent document level validation.
44+
*
45+
* For servers < 3.2, this option is ignored as document level validation
46+
* is not available.
4447
*
4548
* * collation (document): Collation specification.
4649
*

src/Operation/UpdateOne.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ class UpdateOne implements Executable
3939
*
4040
* Supported options:
4141
*
42-
* * bypassDocumentValidation (boolean): If true, allows the write to opt
43-
* out of document level validation.
42+
* * bypassDocumentValidation (boolean): If true, allows the write to
43+
* circumvent document level validation.
44+
*
45+
* For servers < 3.2, this option is ignored as document level validation
46+
* is not available.
4447
*
4548
* * collation (document): Collation specification.
4649
*

0 commit comments

Comments
 (0)