Skip to content

Commit 58559e3

Browse files
authored
PHPLIB-1120: Remove redundant options from with_transaction() docs examples (#1103)
1 parent b97cffb commit 58559e3

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

tests/DocumentationExamplesTest.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,13 +1799,7 @@ public function testWithTransactionExample(): void
17991799

18001800
// Step 3: Use with_transaction to start a transaction, execute the callback, and commit (or abort on error).
18011801

1802-
$transactionOptions = [
1803-
'readConcern' => new \MongoDB\Driver\ReadConcern(\MongoDB\Driver\ReadConcern::LOCAL),
1804-
'writeConcern' => new \MongoDB\Driver\WriteConcern(\MongoDB\Driver\WriteConcern::MAJORITY, 1000),
1805-
'readPreference' => new \MongoDB\Driver\ReadPreference(\MongoDB\Driver\ReadPreference::PRIMARY),
1806-
];
1807-
1808-
\MongoDB\with_transaction($session, $callback, $transactionOptions);
1802+
\MongoDB\with_transaction($session, $callback);
18091803

18101804
// End Transactions withTxn API Example 1
18111805
// phpcs:enable

0 commit comments

Comments
 (0)