Skip to content

Commit f39ceba

Browse files
committed
PHPLIB-240: FindAndModify should throw for unsupported write concern
This reverts the logic in 21b7d92aef4def00abade10911bae41f1b5ea378, which was to ignore an unsupported write concern for the duration of 1.x. Since the Collection helper methods do not supply a default write concern option if it is not supported, this change will only affect users that were explicitly passing a write concern and relying on the library to ignore it. While a minor BC break, this changes makes findAndModify consistent with other write commands.
1 parent d0c9edf commit f39ceba

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ source:
1818
file: apiargs-MongoDBCollection-common-option.yaml
1919
ref: writeConcern
2020
post: |
21-
This is not supported for server versions prior to 3.2 and will be ignored if
22-
used.
21+
This is not supported for server versions prior to 3.2 and will result in an
22+
exception at execution time if used.
2323
...

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ source:
3939
file: apiargs-MongoDBCollection-common-option.yaml
4040
ref: writeConcern
4141
post: |
42-
This is not supported for server versions prior to 3.2 and will be ignored if
43-
used.
42+
This is not supported for server versions prior to 3.2 and will result in an
43+
exception at execution time if used.
4444
...

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ source:
3939
file: apiargs-MongoDBCollection-common-option.yaml
4040
ref: writeConcern
4141
post: |
42-
This is not supported for server versions prior to 3.2 and will be ignored if
43-
used.
42+
This is not supported for server versions prior to 3.2 and will result in an
43+
exception at execution time if used.
4444
...

0 commit comments

Comments
 (0)