@@ -282,7 +282,7 @@ public function createCollection($collectionName, array $options = [])
282
282
283
283
$ server = select_server ($ this ->manager , $ options );
284
284
285
- if (! isset ($ options ['writeConcern ' ]) && server_supports_feature ($ server , self ::$ wireVersionForWritableCommandWriteConcern )) {
285
+ if (! isset ($ options ['writeConcern ' ]) && server_supports_feature ($ server , self ::$ wireVersionForWritableCommandWriteConcern ) && ! is_in_transaction ( $ options ) ) {
286
286
$ options ['writeConcern ' ] = $ this ->writeConcern ;
287
287
}
288
288
@@ -309,7 +309,7 @@ public function drop(array $options = [])
309
309
310
310
$ server = select_server ($ this ->manager , $ options );
311
311
312
- if (! isset ($ options ['writeConcern ' ]) && server_supports_feature ($ server , self ::$ wireVersionForWritableCommandWriteConcern )) {
312
+ if (! isset ($ options ['writeConcern ' ]) && server_supports_feature ($ server , self ::$ wireVersionForWritableCommandWriteConcern ) && ! is_in_transaction ( $ options ) ) {
313
313
$ options ['writeConcern ' ] = $ this ->writeConcern ;
314
314
}
315
315
@@ -337,7 +337,7 @@ public function dropCollection($collectionName, array $options = [])
337
337
338
338
$ server = select_server ($ this ->manager , $ options );
339
339
340
- if (! isset ($ options ['writeConcern ' ]) && server_supports_feature ($ server , self ::$ wireVersionForWritableCommandWriteConcern )) {
340
+ if (! isset ($ options ['writeConcern ' ]) && server_supports_feature ($ server , self ::$ wireVersionForWritableCommandWriteConcern ) && ! is_in_transaction ( $ options ) ) {
341
341
$ options ['writeConcern ' ] = $ this ->writeConcern ;
342
342
}
343
343
@@ -444,7 +444,7 @@ public function modifyCollection($collectionName, array $collectionOptions, arra
444
444
445
445
$ server = select_server ($ this ->manager , $ options );
446
446
447
- if (! isset ($ options ['writeConcern ' ]) && server_supports_feature ($ server , self ::$ wireVersionForWritableCommandWriteConcern )) {
447
+ if (! isset ($ options ['writeConcern ' ]) && server_supports_feature ($ server , self ::$ wireVersionForWritableCommandWriteConcern ) && ! is_in_transaction ( $ options ) ) {
448
448
$ options ['writeConcern ' ] = $ this ->writeConcern ;
449
449
}
450
450
0 commit comments