Skip to content

Commit b935a24

Browse files
authored
DOCSP-5403 Update PHP landing page (#506)
* DOCSP-5403 Update PHP driver landing page * "API Documentation" -> "API Reference" Modify some lingering places for consistency. * Remove additional php versions text * Fix php code highlighting
1 parent 853f6b2 commit b935a24

File tree

4 files changed

+111
-135
lines changed

4 files changed

+111
-135
lines changed

source/drivers/driver-compatibility-reference.txt

Lines changed: 1 addition & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -260,76 +260,7 @@ MongoDB Compatibility
260260
Language Compatibility
261261
~~~~~~~~~~~~~~~~~~~~~~
262262

263-
.. include:: /includes/extracts/php-driver-compatibility-matrix-language.rst
264-
265-
.. list-table::
266-
:header-rows: 1
267-
:stub-columns: 1
268-
:class: compatibility-large
269-
270-
* - PHP Driver
271-
- PHP 5.4
272-
- PHP 5.5
273-
- PHP 5.6
274-
- PHP 7.0
275-
- PHP 7.1
276-
- PHP 7.2
277-
- PHP 7.3
278-
279-
* - mongodb-1.5
280-
-
281-
- |checkmark|
282-
- |checkmark|
283-
- |checkmark|
284-
- |checkmark|
285-
- |checkmark|
286-
- |checkmark|
287-
288-
* - mongodb-1.4
289-
-
290-
- |checkmark|
291-
- |checkmark|
292-
- |checkmark|
293-
- |checkmark|
294-
- |checkmark|
295-
-
296-
297-
298-
* - mongodb-1.3
299-
-
300-
- |checkmark|
301-
- |checkmark|
302-
- |checkmark|
303-
- |checkmark|
304-
- |checkmark|
305-
-
306-
307-
* - mongodb-1.2
308-
- |checkmark|
309-
- |checkmark|
310-
- |checkmark|
311-
- |checkmark|
312-
- |checkmark|
313-
-
314-
-
315-
316-
* - mongodb-1.1
317-
- |checkmark|
318-
- |checkmark|
319-
- |checkmark|
320-
- |checkmark|
321-
- |checkmark|
322-
-
323-
-
324-
325-
* - mongodb-1.0
326-
- |checkmark|
327-
- |checkmark|
328-
- |checkmark|
329-
-
330-
-
331-
-
332-
-
263+
.. include:: /includes/language-compatibility-table-php.rst
333264

334265
.. _reference-compatibility-python:
335266

source/drivers/node.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ driver and BSON library.
2424

2525
- `Usage Guide <http://mongodb.github.io/node-mongodb-native/3.2/reference/main/>`__
2626

27-
- `API Documentation <http://mongodb.github.io/node-mongodb-native/3.2/api/>`_
27+
- `API Reference <http://mongodb.github.io/node-mongodb-native/3.2/api/>`_
2828

2929
- `Changelog <http://mongodb.github.io/node-mongodb-native/3.2/upgrade-migration/main/>`__
3030

source/drivers/php.txt

Lines changed: 71 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.. _php-language-center:
22

3+
.. include:: /includes/unicode-checkmark.rst
4+
35
==================
46
MongoDB PHP Driver
57
==================
@@ -12,33 +14,67 @@ MongoDB PHP Driver
1214
:depth: 1
1315
:class: twocols
1416

15-
For the official MongoDB PHP Driver reference, see:
17+
Introduction
18+
------------
1619

17-
- `MongoDB PHP Library Documentation
18-
<https://docs.mongodb.com/php-library/>`_
20+
The currently maintained driver is the `mongodb
21+
<https://pecl.php.net/package/mongodb>`_ extension available from PECL.
1922

20-
- `MongoDB PHP Extension Documentation
21-
<http://php.net/manual/en/set.mongodb.php>`_
23+
You might consider using the driver with the complimentary `PHP library
24+
<https://github.com/mongodb/mongo-php-library>`_, which implements a more
25+
full-featured API on top of the bare-bones driver.
2226

23-
Drivers
24-
-------
27+
Further information on this architecture may be found
28+
in the `PHP.net documentation <http://php.net/manual/en/mongodb.overview.php>`_.
29+
30+
- `Tutorials <https://www.php.net/manual/en/mongodb.tutorial.php>`__
31+
32+
- `Driver Architecture and Internals <https://www.php.net/manual/en/mongodb.architecture.php>`__
33+
34+
- `API Reference <https://php.net/manual/en/book.mongodb.php>`_
35+
36+
- `Changelog <https://github.com/mongodb/mongo-php-driver/releases>`__
37+
38+
- `Source Code <https://github.com/mongodb/mongo-php-driver>`__
39+
40+
41+
Installation
42+
------------
43+
44+
You can install the driver using
45+
`PECL <https://www.php.net/manual/en/mongodb.installation.pecl.php>`_:
46+
47+
.. code-block:: sh
48+
49+
$ pecl install mongodb
50+
$ echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
51+
52+
The preferred method of installing the optional but recommended PHP library is with
53+
`Composer <https://getcomposer.org/>`_ by running the following from your project root:
54+
55+
.. code-block:: sh
56+
57+
$ composer require mongodb/mongodb
58+
59+
Additional installation instructions may be found in the
60+
`library documentation <https://docs.mongodb.com/php-library/current/tutorial/install-php-library/>`_.
61+
62+
63+
Connect to MongoDB Atlas
64+
------------------------
65+
66+
To connect to a `MongoDB Atlas <https://docs.atlas.mongodb.com/>`_ cluster, use the `Atlas connection string <https://docs.atlas.mongodb.com/driver-connection>`__ for your cluster:
67+
68+
.. code-block:: php
69+
70+
<?php
71+
72+
$client = new MongoDB\Client(
73+
'mongodb+srv://<username>:<password>@<cluster-address>/test?retryWrites=true&w=majority'
74+
);
75+
76+
$db = $client->test;
2577

26-
The currently maintained driver is the `mongodb
27-
<https://pecl.php.net/package/mongodb>`_ extension available from PECL. This
28-
driver can be used stand-alone, although it is very bare-bones. You should
29-
consider using the driver with the complimentary `PHP library
30-
<https://github.com/mongodb/mongo-php-library>`_, which implements a more
31-
full-featured API on top of the bare-bones driver. Further information on this
32-
architecture may be found in the `PHP.net documentation
33-
<http://php.net/manual/en/mongodb.overview.php>`_.
34-
35-
The `mongo <https://pecl.php.net/package/mongo>`_ extension available from PECL
36-
is an older, legacy driver for PHP 5.x. The ``mongo`` extension is no longer
37-
maintained and new projects are advised to use the ``mongodb`` extension and
38-
PHP library. A community-developed `Mongo PHP Adapter
39-
<https://github.com/alcaeus/mongo-php-adapter>`_ project implements the legacy
40-
``mongo`` extension's API using the new ``mongodb`` extension and PHP library,
41-
which may be useful for those wishing to migrate existing applications.
4278

4379
Compatibility
4480
-------------
@@ -55,48 +91,16 @@ MongoDB Compatibility
5591
Language Compatibility
5692
~~~~~~~~~~~~~~~~~~~~~~
5793

58-
.. include:: /includes/extracts/php-driver-compatibility-matrix-language.rst
59-
60-
.. list-table::
61-
:header-rows: 1
62-
:stub-columns: 1
63-
:class: compatibility-large
64-
65-
* - PHP Driver
66-
- PHP 5.5
67-
- PHP 5.6
68-
- PHP 7.0
69-
- PHP 7.1
70-
- PHP 7.2
71-
- PHP 7.3
72-
73-
* - mongodb-1.5
74-
- |checkmark|
75-
- |checkmark|
76-
- |checkmark|
77-
- |checkmark|
78-
- |checkmark|
79-
- |checkmark|
80-
81-
* - mongodb-1.4
82-
- |checkmark|
83-
- |checkmark|
84-
- |checkmark|
85-
- |checkmark|
86-
- |checkmark|
87-
-
88-
89-
* - mongodb-1.3
90-
- |checkmark|
91-
- |checkmark|
92-
- |checkmark|
93-
- |checkmark|
94-
- |checkmark|
95-
-
96-
97-
.. include:: /includes/extracts/php-driver-compatibility-full-language.rst
94+
.. include:: /includes/language-compatibility-table-php.rst
95+
96+
How to get help
97+
---------------
98+
99+
- Join our `Google Group <https://groups.google.com/forum/#!forum/mongodb-user>`__.
100+
- Ask on `Stack Overflow <https://stackoverflow.com/questions/tagged/mongodb+php>`__.
101+
- Visit our `Support Channels <https://docs.mongodb.com/manual/support/>`__.
102+
- See our `JIRA <https://jira.mongodb.org/projects/PHP/summary>`__ to raise issues or request features.
98103

99-
.. include:: /includes/unicode-checkmark.rst
100104

101105
See Also
102106
--------
@@ -109,3 +113,6 @@ See Also
109113
:titlesonly:
110114

111115
/drivers/php-libraries
116+
117+
118+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.. include:: /includes/extracts/php-driver-compatibility-matrix-language.rst
2+
3+
.. list-table::
4+
:header-rows: 1
5+
:stub-columns: 1
6+
:class: compatibility-large
7+
8+
* - PHP Driver
9+
- PHP 5.5
10+
- PHP 5.6
11+
- PHP 7.0
12+
- PHP 7.1
13+
- PHP 7.2
14+
- PHP 7.3
15+
16+
* - mongodb-1.5
17+
- |checkmark|
18+
- |checkmark|
19+
- |checkmark|
20+
- |checkmark|
21+
- |checkmark|
22+
- |checkmark|
23+
24+
* - mongodb-1.4
25+
- |checkmark|
26+
- |checkmark|
27+
- |checkmark|
28+
- |checkmark|
29+
- |checkmark|
30+
-
31+
32+
* - mongodb-1.3
33+
- |checkmark|
34+
- |checkmark|
35+
- |checkmark|
36+
- |checkmark|
37+
- |checkmark|
38+
-

0 commit comments

Comments
 (0)