Skip to content

DOCSP-41950: Landing page #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions snooty.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ toc_landing_pages = [
"/reference/class/MongoDBModelDatabaseInfo",
"/reference/class/MongoDBModelIndexInfo",
"/get-started",
"/databases-collections",
"/write",
"/indexes"
"/indexes",
"/data-formats"
]

sharedinclude_root = "https://raw.githubusercontent.com/10gen/docs-shared/main/"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S: should we rename "driver-short"? Line 37

Expand All @@ -33,7 +35,7 @@ php-library = "MongoDB PHP Library"

[constants]
php-library = "MongoDB PHP Library"
driver-short = "PHP library"
library-short = "PHP library"
stable-api = "Stable API"
mdb-server = "MongoDB Server"
api = "https://www.mongodb.com/docs/php-library/current/reference"
Expand Down
2 changes: 0 additions & 2 deletions source/compatibility.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ The first column lists the version of the library and extension.

.. include:: /includes/language-compatibility-table-php.rst

.. sharedinclude:: dbx/about-driver-compatibility.rst

For more information on how to read the compatibility tables, see our guide on
:ref:`MongoDB Compatibility Tables <about-driver-compatibility>`.

Expand Down
6 changes: 3 additions & 3 deletions source/connect/client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ Overview

To connect to a MongoDB deployment, you must create the following items:

- **Connection URI**, also known as a *connection string*, which tells the {+driver-short+}
- **Connection URI**, also known as a *connection string*, which tells the {+library-short+}
which MongoDB deployment to connect to.
- **MongoDB\\Client** object, which creates the connection to the MongoDB deployment
and lets you perform operations on it.

You can also set options within either or both of these components to
customize the way that the {+driver-short+} behaves
customize the way that the {+library-short+} behaves
while connected to MongoDB.

This guide describes the components of a connection string and shows how to
Expand Down Expand Up @@ -99,7 +99,7 @@ deployment on port ``27017`` of ``localhost``:
API Documentation
-----------------

To learn more about creating a ``MongoDB\Client`` object in the {+driver-short+},
To learn more about creating a ``MongoDB\Client`` object in the {+library-short+},
see the following API documentation:

- :ref:`MongoDB\Client <php-api-mongodbclient>`
6 changes: 3 additions & 3 deletions source/connect/connection-targets.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ breaking changes when Atlas upgrades to a new version of {+mdb-server+}.
To learn more about the {+stable-api+} feature, see the :ref:`{+stable-api+} page
<php-stable-api>`.

The following code shows how to use the {+driver-short+} to connect to an Atlas cluster.
The following code shows how to use the {+library-short+} to connect to an Atlas cluster.
The code also uses the ``serverApi`` option to specify a {+stable-api+} version.

.. literalinclude:: /includes/connect/atlas.php
Expand All @@ -63,7 +63,7 @@ To connect to a local MongoDB deployment, use ``localhost`` as the hostname. By
default, the ``mongod`` process runs on port 27017, though you can customize this for
your deployment.

The following code shows how to use the {+driver-short+} to connect to a local MongoDB
The following code shows how to use the {+library-short+} to connect to a local MongoDB
deployment:

.. literalinclude:: /includes/connect/client.php
Expand All @@ -79,7 +79,7 @@ To connect to a replica set, specify the hostnames (or IP addresses) and
port numbers of the replica set members in your connection string.

If you aren't able to provide a full list of hosts in the replica set, you can
specify one or more of the hosts in the replica set and instruct the {+driver-short+} to
specify one or more of the hosts in the replica set and instruct the {+library-short+} to
perform automatic discovery to find the others. To instruct the driver to perform
automatic discovery, choose one of the following actions:

Expand Down
30 changes: 15 additions & 15 deletions source/connect/tls.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Overview
In this guide, you can learn how to use the :wikipedia:`TLS <Transport_Layer_Security>`
protocol to secure your connection to a MongoDB deployment.

When you enable TLS for a connection, the {+driver-short+} performs the following actions:
When you enable TLS for a connection, the {+library-short+} performs the following actions:

- Uses TLS to connect to the MongoDB deployment
- Verifies the deployment's certificate
Expand All @@ -41,7 +41,7 @@ To learn how to configure your MongoDB deployment for TLS, see the

.. tip::

The {+driver-short+} delegates most TLS behavior to the MongoDB C Driver.
The {+library-short+} delegates most TLS behavior to the MongoDB C Driver.
For information about how the C driver handles TLS, including configuration steps
and expected behavior, see
`Configuring TLS <https://www.mongodb.com/docs/languages/c/c-driver/current/libmongoc/guides/configuring_tls/#supported-libraries>`__
Expand Down Expand Up @@ -78,7 +78,7 @@ signed by a well-known CA (certificate authority), and your application relies o
to validate the certificate.

During testing, however, you might want to act as your own CA.
In this case, you must instruct the {+driver-short+} to
In this case, you must instruct the {+library-short+} to
use your CA certificates instead of ones signed by another CA.

To do so, use the ``tlsCAFile`` connection option to specify the path to a ``.pem`` file
Expand All @@ -95,7 +95,7 @@ Specify a CA Directory

If you are using OpenSSL or LibreSSL (``libtls``) for TLS support, you can also use
the ``ca_dir`` option to instruct
the {+driver-short+} to search for a CA file within a directory. The driver searches this
the {+library-short+} to search for a CA file within a directory. The driver searches this
directory if it doesn't find a CA file at the path specified in the ``tlsCAFile`` option.

The following code example shows how to use the ``driverOptions`` parameter to specify the
Expand All @@ -119,7 +119,7 @@ Check Certificate Revocation
----------------------------

When an X.509 certificate is no longer trustworthy—for example, if its private key
has been compromised—the CA revokes the certificate. The {+driver-short+} includes two ways
has been compromised—the CA revokes the certificate. The {+library-short+} includes two ways
to check whether a server's certificate has been revoked.

.. _php-disable-ocsp:
Expand All @@ -131,15 +131,15 @@ The Online Certificate Status Protocol (OCSP) process varies depending on the ve
{+mdb-server+} you're connecting to:

- **MongoDB v4.4 or later:** The server staples a
time-stamped OCSP response to its certificate. The {+driver-short+} validates the certificate
time-stamped OCSP response to its certificate. The {+library-short+} validates the certificate
against the OCSP response. If the CA has revoked the certificate, or if the OCSP response
is otherwise invalid, the TLS handshake fails.
- **MongoDB v4.3 or earlier:** The server supplies an OCSP endpoint, which the {+driver-short+}
contacts directly. The {+driver-short+} then validates the certificate against the OCSP
- **MongoDB v4.3 or earlier:** The server supplies an OCSP endpoint, which the {+library-short+}
contacts directly. The {+library-short+} then validates the certificate against the OCSP
response. If the CA hasn't revoked the certificate, the TLS handshake continues, even if
the OCSP response is invalid or malformed.

To stop the {+driver-short+} from contacting the OCSP endpoint, set the
To stop the {+library-short+} from contacting the OCSP endpoint, set the
``tlsDisableOCSPEndpointCheck`` connection option to ``true``.
You can do this in two ways: by passing an argument to the
``MongoDB\Client`` constructor or through a parameter in your connection string.
Expand All @@ -148,15 +148,15 @@ You can do this in two ways: by passing an argument to the

.. note::

Even if the ``tlsDisableOCSPEndpointCheck`` option is set to ``true``, the {+driver-short+}
Even if the ``tlsDisableOCSPEndpointCheck`` option is set to ``true``, the {+library-short+}
still verifies any OCSP response stapled to a server's certificate.

.. _php-crl:

Certificate Revocation List
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Instead of using OCSP, you can use the instruct the {+driver-short+}
Instead of using OCSP, you can use the instruct the {+library-short+}
to check the server's certificate
against a Certificate Revocation List (CRL) published by the CA. To do so, set the
``crl_file`` option to the file path of the CRL. Include this option in the
Expand All @@ -177,7 +177,7 @@ Present a Client Certificate
----------------------------

Some MongoDB deployments require every connecting application to present a client certificate
that proves its identity. To specify the client certificate for the {+driver-short+} to
that proves its identity. To specify the client certificate for the {+library-short+} to
present, set the ``tleCertificateKeyFile`` option to the file path of the ``.pem`` file that
contains your certificate and private key.

Expand Down Expand Up @@ -214,7 +214,7 @@ of the ``MongoDB\Client`` constructor or through a parameter in your connection
Allow Insecure TLS
------------------

When TLS is enabled, the {+driver-short+} automatically verifies the certificate that
When TLS is enabled, the {+library-short+} automatically verifies the certificate that
the server presents. When testing your code, you can disable this verification.
This is known as *insecure TLS.*

Expand Down Expand Up @@ -262,7 +262,7 @@ To disable only hostname verification, set the ``tlsAllowInvalidHostnames`` opti
API Documentation
-----------------

To learn more about configuring TLS for the {+driver-short+},
To learn more about configuring TLS for the {+library-short+},
see the following API documentation:

- :ref:`MongoDB\Client <php-mongodb-client>`
- :phpclass:`MongoDB\Client`
40 changes: 40 additions & 0 deletions source/data-formats.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.. _php-data-formats:

========================
Specialized Data Formats
========================

.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol

.. facet::
:name: genre
:values: reference

.. meta::
:keywords: store, bson, codec

.. toctree::
:titlesonly:
:maxdepth: 1

/data-formats/custom-types
/data-formats/codecs
/data-formats/decimal128
/data-formats/modeling-bson-data


Overview
--------

You can use several types of specialized data formats in your {+library-short+}
application. To learn how to work with these data formats, see the following
guides:

- :ref:`php-custom-types`
- :ref:`php-codecs`
- :ref:`php-decimal128`
- :ref:`php-bson`
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _php-custom-types:

=================
Custom Data-Types
=================
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _php-decimal128:

==========
Decimal128
==========
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _php-bson:

==================
Modeling BSON Data
==================
Expand Down
2 changes: 2 additions & 0 deletions source/faq.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _php-faq:

==========================
Frequently Asked Questions
==========================
Expand Down
Loading
Loading