1
1
.. _laravel-upgrading:
2
2
3
- =========
4
- Upgrading
5
- =========
3
+ ===================
4
+ Upgrade ODM Version
5
+ ===================
6
6
7
7
.. facet::
8
8
:name: genre
@@ -11,11 +11,67 @@ Upgrading
11
11
.. meta::
12
12
:keywords: php framework, odm, code example
13
13
14
+ Overview
15
+ --------
16
+
17
+ On this page, you can learn how to upgrade {+odm-short+} to a new version. This page also
18
+ includes the changes you must make to your application to upgrade your ODM version
19
+ without losing functionality, if applicable.
20
+
14
21
The PHP library uses `semantic versioning <https://semver.org/>`__. Upgrading
15
22
to a new major version may require changes to your application.
16
23
17
- Upgrading from version 3 to 4
18
- -----------------------------
24
+ How to Upgrade
25
+ --------------
26
+
27
+ Before you upgrade, perform the following actions:
28
+
29
+ - Ensure the new driver version is compatible with the {+mdb-server+} version
30
+ your application connects to and the version of Node.js that your
31
+ application runs on. See the :ref:`<node-compatibility>`
32
+ page for this information.
33
+ - Address any breaking changes between the version of the driver
34
+ your application currently uses and your planned upgrade version in the
35
+ :ref:`<node-breaking-changes>` section of this guide. To learn
36
+ more about the {+mdb-server+} release compatibility changes, see the
37
+ :ref:`<node-server-support-changes>` section.
38
+
39
+ .. tip::
40
+
41
+ You can minimize the amount of changes that you need to make to your
42
+ application when upgrading driver versions by using the
43
+ :ref:`{+stable-api+} <nodejs-stable-api>`.
44
+
45
+ To upgrade your driver version, run the following command in your application's
46
+ directory:
47
+
48
+ .. code-block:: bash
49
+
50
+ npm install mongodb@{+version+}
51
+
52
+ To upgrade to a different version of the driver, replace the information after the
53
+ ``@`` symbol with your preferred version number. For more information about the
54
+ ``npm install`` command, see the `npm-install <https://docs.npmjs.com/cli/v10/commands/npm-install?v=true>`__
55
+ npm documentation.
56
+
57
+ .. _laravel-breaking-changes:
58
+
59
+ Breaking Changes
60
+ ----------------
61
+
62
+ A breaking change is a modification in a convention or behavior in
63
+ a specific version of {+odm-short+} that may prevent your application from
64
+ working as expected.
65
+
66
+ The breaking changes in this section are categorized by the major
67
+ version releases that introduced them. When upgrading ODM versions,
68
+ address all the breaking changes between your current version and the
69
+ planned upgrade version.
70
+
71
+ .. _laravel-breaking-changes-v4.x:
72
+
73
+ Version 4.x Breaking Changes
74
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19
75
20
76
- Laravel 10.x is required
21
77
0 commit comments