@@ -282,7 +282,7 @@ public function createCollection($collectionName, array $options = [])
282282
283283 $ server = select_server ($ this ->manager , $ options );
284284
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 ) ) {
286286 $ options ['writeConcern ' ] = $ this ->writeConcern ;
287287 }
288288
@@ -309,7 +309,7 @@ public function drop(array $options = [])
309309
310310 $ server = select_server ($ this ->manager , $ options );
311311
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 ) ) {
313313 $ options ['writeConcern ' ] = $ this ->writeConcern ;
314314 }
315315
@@ -337,7 +337,7 @@ public function dropCollection($collectionName, array $options = [])
337337
338338 $ server = select_server ($ this ->manager , $ options );
339339
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 ) ) {
341341 $ options ['writeConcern ' ] = $ this ->writeConcern ;
342342 }
343343
@@ -444,7 +444,7 @@ public function modifyCollection($collectionName, array $collectionOptions, arra
444444
445445 $ server = select_server ($ this ->manager , $ options );
446446
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 ) ) {
448448 $ options ['writeConcern ' ] = $ this ->writeConcern ;
449449 }
450450
0 commit comments