We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef8dcb3 commit 4338b10Copy full SHA for 4338b10
source/includes/connect/stable-api.php
@@ -1,3 +1,5 @@
1
+<?php
2
+
3
// start-specify-v1
4
$uri = "mongodb://<hostname>:<port>";
5
@@ -9,6 +11,8 @@
9
11
// start-stable-api-options
10
12
13
-$driverOptions = ['serverApi' => new MongoDB\Driver\ServerApi('1', strict: true, deprecationErrors: true)];
14
+$serverApi = new MongoDB\Driver\ServerApi('1', strict: true, deprecationErrors: true);
15
+$driverOptions = ['serverApi' => $serverApi];
16
17
$client = new MongoDB\Client($uri, [], $driverOptions);
18
// end-stable-api-options
0 commit comments