Skip to content

Commit e1fe3f3

Browse files
committed
MW PR fixes 1
1 parent c79a3ee commit e1fe3f3

File tree

2 files changed

+9
-109
lines changed

2 files changed

+9
-109
lines changed

source/php-drivers.txt

Lines changed: 4 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,19 @@ The MongoDB PHP Driver consists of the following components:
3939

4040
- `Extension <https://php.net/mongodb>`__:
4141
Provides a low-level API and mainly serves to integrate
42-
the `C Driver <https://www.mongodb.com/docs/languages/c/c-driver/current/>`__
43-
`libmongoc <https://mongoc.org/libmongoc/current/>`__ and
42+
the `libmongoc <https://mongoc.org/libmongoc/current/>`__ and
4443
`libbson <https://mongoc.org/libbson/current/>`__ libraries with PHP.
4544

4645
- `Library <https://www.mongodb.com/docs/php-library/current>`__:
4746
Provides a high-level API for working with MongoDB
4847
databases consistent with other MongoDB language drivers.
4948

50-
While it is possible to use the extension alone, MongoDB recommends
51-
using both the extension and the library together. To learn more about
49+
While it is possible to use only the extension, we recommend
50+
using the extension and the library together. To learn more about
5251
the components of the PHP driver, see the :ref:`php-driver-arch` section
5352
of this page.
5453

55-
Navigate through the following links to learn more about the driver and access
54+
View the following guides to learn more about the driver and access
5655
tutorial content on setting up a runnable project:
5756

5857
- `Get Started with the PHP Library <https://www.mongodb.com/docs/php-library/current/get-started/>`__
@@ -102,104 +101,6 @@ provides the following functionality:
102101
To learn more about the system libraries, see the `C Driver
103102
<https://www.mongodb.com/docs/languages/c/c-driver/current/>`__ documentation.
104103

105-
Connect to a Compatible MongoDB Deployment
106-
------------------------------------------
107-
108-
You can use the PHP driver to connect to deployments hosted in the
109-
following environments:
110-
111-
.. include:: /includes/fact-environments.rst
112-
113-
Installation
114-
------------
115-
116-
First, make sure you have a recent version of PHP installed on your
117-
system. See the
118-
`official PHP manual <https://www.php.net/manual/en/install.php>`__
119-
for download and installation instructions.
120-
121-
Install the PHP MongoDB Extension before installing the PHP Library for
122-
MongoDB. You can install the extension using
123-
`PECL <https://www.php.net/manual/en/mongodb.installation.php>`__ on
124-
the command line:
125-
126-
.. code-block:: sh
127-
128-
$ sudo pecl install mongodb
129-
130-
Finally, add the following line to your ``php.ini`` file:
131-
132-
.. code-block:: text
133-
134-
extension=mongodb.so
135-
136-
.. note::
137-
138-
On some systems, there may be multiple INI files for individual SAPIs (e.g.
139-
CLI, FPM). Make sure to enable the extension in all SAPIs that you need.
140-
141-
The preferred method of installing the PHP library is with
142-
`Composer <https://getcomposer.org/>`__ by running the following from your project root:
143-
144-
.. code-block:: sh
145-
146-
$ composer require mongodb/mongodb
147-
148-
Once you have installed the library, ensure that your application includes
149-
Composer's autoloader as in the following example:
150-
151-
.. code-block:: php
152-
153-
<?php
154-
155-
require_once __DIR__ . '/vendor/autoload.php';
156-
157-
Additional installation instructions may be found in the
158-
`library documentation <https://www.mongodb.com/docs/php-library/current/tutorial/install-php-library/>`__.
159-
160-
.. _connect-atlas-php-driver:
161-
162-
Connect to MongoDB Atlas
163-
------------------------
164-
165-
You can use the following connection snippet to test your connection to
166-
your MongoDB deployment on Atlas:
167-
168-
.. literalinclude:: /includes/connection-snippets/scram/php-connection.php
169-
:language: php
170-
171-
This connection snippet uses the {+stable-api+} feature, which you can
172-
enable when using the PHP driver v1.9 and later to connect to MongoDB Server
173-
v5.0 and later. When you use this feature, you can update your driver or server without
174-
worrying about backward compatibility issues with any commands covered by the
175-
{+stable-api+}.
176-
177-
To learn more about the {+stable-api+} feature, see
178-
:manual:`{+stable-api+} </reference/stable-api/>` in the Server manual.
179-
180-
.. include:: /includes/stable-api-notice.rst
181-
182-
.. _connect-atlas-no-stable-api-php-driver:
183-
184-
Connect to MongoDB Atlas Without the Stable API
185-
-----------------------------------------------
186-
187-
If you are using a version of MongoDB or the driver that doesn't support the
188-
{+stable-api+} feature, you can use the following code snippet to test your connection
189-
to your MongoDB deployment on Atlas:
190-
191-
.. literalinclude:: /includes/connection-snippets/scram/php-connection-no-stableapi.php
192-
:language: php
193-
194-
Connect to a MongoDB Server on Your Local Machine
195-
-------------------------------------------------
196-
197-
.. include:: /includes/localhost-connection.rst
198-
199-
To test whether you can connect to your server, replace the connection
200-
string in the :ref:`Connect to MongoDB Atlas <connect-atlas-php-driver>` code
201-
example and run it.
202-
203104
Compatibility
204105
-------------
205106

source/php-frameworks/drupal.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,14 @@ Overview
2121
--------
2222

2323
In this guide, you can learn about the benefits of using MongoDB Atlas
24-
as the database for Drupal sites and navigate to a tutorial that
25-
demonstrates how to set up the MongoDB driver for Drupal.
24+
as the database for Drupal sites.
2625

2726
`Drupal <https://www.drupal.org/about>`__ is an open-source web content
2827
management system (CMS) written in PHP. Drupal provides simple content
2928
authoring, composability, and robust authentication features.
3029

3130
The :ref:`php-drupal-tutorial` section of this guide links to a tutorial
32-
which you can follow to set up a Drupal site that connects to MongoDB Atlas.
31+
that you can follow to set up a Drupal site that connects to MongoDB Atlas.
3332

3433
The :ref:`php-drupal-resources` section contains links to resources and
3534
documentation for further learning.
@@ -41,8 +40,8 @@ Websites that seek to provide personalized user experiences must contain
4140
robust capabilities for user authentication. Sites that have many
4241
authenticated users might face performance impacts due to the complexity
4342
of retrieving entity data from multiple tables in a relational database.
44-
MongoDB supports eliminates the need for complicated table joins and
45-
thus increases data retrieval speed, enhancing user experience with
43+
MongoDB eliminates the need for complicated table joins and
44+
thus increases data retrieval speed, enhancing user experience of
4645
components such as personalized dashboards and dynamic content feeds.
4746

4847
When you use MongoDB Atlas as your site's database, Drupal stores entity
@@ -58,7 +57,7 @@ MongoDB offers the following features that improve your Drupal sites:
5857
- Integrated file storage: Store user files directly in the
5958
database instead of on the web server, simplifying hosting.
6059

61-
- Full-Text search: Avoid implementing separate search
60+
- Full-text search: Avoid implementing separate search
6261
solutions by leveraging the :atlas:`Atlas Search
6362
</atlas-search/atlas-search-overview/>` feature.
6463

0 commit comments

Comments
 (0)