Skip to content

Commit c4c0deb

Browse files
committed
Server::executeBulkWriteCommand() always returns a BulkWriteCommandResult
1 parent dc674a0 commit c4c0deb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: src/Client.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ final public function addSubscriber(Subscriber $subscriber): void
202202
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)
203203
* @see ClientBulkWriteCommand::__construct() for supported options
204204
*/
205-
public function bulkWrite(BulkWriteCommand|ClientBulkWrite $bulk, array $options = []): ?BulkWriteCommandResult
205+
public function bulkWrite(BulkWriteCommand|ClientBulkWrite $bulk, array $options = []): BulkWriteCommandResult
206206
{
207207
if (! isset($options['writeConcern']) && ! is_in_transaction($options)) {
208208
$options['writeConcern'] = $this->writeConcern;

Diff for: src/Operation/ClientBulkWriteCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function __construct(private BulkWriteCommand $bulkWriteCommand, private
7878
* @throws UnsupportedException if write concern is used and unsupported
7979
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)
8080
*/
81-
public function execute(Server $server): ?BulkWriteCommandResult
81+
public function execute(Server $server): BulkWriteCommandResult
8282
{
8383
$inTransaction = isset($this->options['session']) && $this->options['session']->isInTransaction();
8484
if ($inTransaction && isset($this->options['writeConcern'])) {

0 commit comments

Comments
 (0)