Skip to content

Commit 91b7c60

Browse files
authored
Merge pull request #152 from lindseymoore/DOCSP-41992
DOCSP-41992 Upgrade versions
2 parents f4834bf + 953a10e commit 91b7c60

File tree

3 files changed

+102
-1
lines changed

3 files changed

+102
-1
lines changed

snooty.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ toc_landing_pages = [
2828
"/write",
2929
"/indexes",
3030
"/security",
31-
"/data-formats"
31+
"/data-formats",
32+
"/upgrade"
3233
]
3334

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

source/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ MongoDB PHP Library
2424
/data-formats
2525
/compatibility
2626
/whats-new
27+
/upgrade
2728
FAQ </faq>
2829
/reference
2930

source/upgrade.txt

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
.. _php-upgrade:
2+
3+
=======================
4+
Upgrade Driver Versions
5+
=======================
6+
7+
.. contents:: On this page
8+
:local:
9+
:backlinks: none
10+
:depth: 1
11+
:class: singlecol
12+
13+
.. facet::
14+
:name: genre
15+
:values: reference
16+
17+
.. meta::
18+
:keywords: compatibility, backwards compatibility
19+
20+
Overview
21+
--------
22+
23+
On this page, you can learn how to upgrade your driver to a new version. This
24+
page also includes the changes you must make to your application when you
25+
upgrade to a new version of the {+php-library+}.
26+
27+
How to Upgrade
28+
--------------
29+
30+
Before you upgrade, perform the following actions:
31+
32+
- Ensure the new {+driver-short+} version is compatible with the {+mdb-server+} versions
33+
your application connects to and the PHP version your
34+
application compiles with. For version compatibility information, see the
35+
:ref:`{+php-library+} Compatibility <php-compatibility>`
36+
page.
37+
- Address any breaking changes between the driver version
38+
your application is using and your planned upgrade version in the
39+
:ref:`Breaking Changes <php-breaking-changes>` section.
40+
41+
.. tip::
42+
43+
To ensure compatibility across {+mdb-server+} versions when
44+
upgrading driver versions, use the :ref:`{+stable-api+} <php-stable-api>`.
45+
46+
Major and minor versions of the PHP extension and library are in sync. This
47+
means you can run an upgrade command for the extension to also upgrade the PHP
48+
library.
49+
50+
Patch versions (x.x.x) for the library and extension are not in sync. Run the
51+
respective commands to update to the patch versions for the library or extension.
52+
53+
To upgrade the PHP extension, replace ``<version-number>`` with the version number
54+
you want to upgrade to and run the following command in your application's
55+
directory:
56+
57+
.. code-block:: bash
58+
59+
pecl upgrade mongodb-<version-number>
60+
61+
To upgrade the PHP library version, replace ``<version-number>`` with the
62+
version number you want to upgrade to and run the following command in your
63+
application's directory:
64+
65+
.. code-block:: bash
66+
67+
composer require mongodb/mongodb:<version-number>
68+
69+
Detailed installation instructions may be found in the
70+
:php:`PHP.net documentation <manual/en/mongodb.installation.php>`.
71+
72+
.. _php-breaking-changes:
73+
74+
Breaking Changes
75+
----------------
76+
77+
A breaking change is a change of a convention or a behavior starting in a specific
78+
version of the driver. This type of change may prevent your application from working
79+
properly if not addressed before upgrading the driver.
80+
81+
The breaking changes in this section are categorized by the driver version that introduced
82+
them. When upgrading driver versions, address all the breaking changes between the current
83+
and upgrade versions.
84+
85+
For more information on release changes, see the release notes and associated
86+
JIRA tickets for each release on `GitHub <https://github.com/mongodb/mongo-php-library/releases>`__.
87+
88+
Version 1.20 Breaking Changes
89+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
90+
91+
This driver version introduces the following breaking changes:
92+
93+
- Drops support for {+mdb-server+} 3.6.
94+
95+
Version 1.19 and Earlier
96+
~~~~~~~~~~~~~~~~~~~~~~~~
97+
98+
For driver versions 1.19 and earlier, see the release notes and associated
99+
JIRA tickets for each release on `GitHub <https://github.com/mongodb/mongo-php-library/releases>`__.

0 commit comments

Comments
 (0)