Skip to content

Commit 17ca258

Browse files
committed
JM feedback 2
1 parent 5f06c44 commit 17ca258

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

source/connect.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@ The following code shows how to connect to a replica set deployment:
125125
:start-after: start-replica-set-uri
126126
:end-before: end-replica-set-uri
127127

128+
.. tip::
129+
130+
To maintain your connection to a replica set deployment when one
131+
host is down, you can provide multiple replica set members in the
132+
connection URI.
133+
128134
To learn more about connecting to a replica set, see :ref:`php-connection-replica-set`
129135
in the Connection Targets guide.
130136

@@ -290,8 +296,8 @@ client certificate:
290296

291297
.. important::
292298

293-
When replacing the ``<password>`` placeholder, ensure that you :wikipedia:`percent-encode
294-
<Percent-encoding>` the value.
299+
When replacing the ``<password>`` placeholder in the connection URI, ensure
300+
that you :wikipedia:`percent-encode <Percent-encoding>` the value.
295301

296302
To learn more about providing a key file password, see :ref:`php-key-file-password` in
297303
the TLS Configuration guide.

source/includes/usage-examples/connect-code-examples.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168

169169
// Connects to a MongoDB deployment and enables the stable API
170170
// start-stable-api
171-
$driverOptions = ['serverApi' => new MongoDB\Driver\ServerApi(ServerApi::V1)];
171+
$driverOptions = ['serverApi' => new MongoDB\Driver\ServerApi('1')];
172172
$client = new MongoDB\Client(
173173
'mongodb://<hostname>:<port>/',
174174
[],

0 commit comments

Comments
 (0)