Upgrade Driver Versions
On this page
Overview
This page describes the changes you must make to your application when you upgrade to a new version of the C driver.
Before you upgrade, perform the following actions:
Ensure the new C driver version is compatible with the MongoDB Server versions your application connects to and the platform your application runs on. For version compatibility information, see the C driver Compatibility page.
Address any breaking changes between the current driver version your application uses and your planned upgrade version in the Breaking Changes section. To learn more about MongoDB Server release compatibility changes, see the Server Release Compatibility Changes section.
Tip
To minimize the number of changes your application requires when upgrading driver versions in the future, use the Stable API. To learn more, see the Stable API guide.
Breaking Changes
Note
The C driver follows semantic versioning. The driver may break build systems or package compatibility in any release. Patch releases may revert accidental API breaking changes.
A breaking change is a change of a convention or a behavior starting in a specific version of the driver. This type of change may prevent your application from working properly if not addressed before upgrading the driver.
The breaking changes in this section are categorized by the driver version that introduced them. When upgrading driver versions, address all the breaking changes between the current and upgrade versions.
Example
Upgrading from Version 1.26
If you're upgrading the C driver from version 1.26 to version 1.27, address all breaking changes listed for versions 1.27.0 to 1.27.6, if any.
Version 1.24.0 Breaking Changes
The 1.24.0 release of libmongoc
, one of the libraries constituting the C driver, introduces
the following backward-breaking change:
Requires MongoDB Server version 7.0 and later to use Queryable Encryption.
Server Release Compatibility Changes
A server release compatibility change is a modification to the driver that discontinues support for a set of MongoDB Server versions.
The driver discontinues support for a MongoDB Server version after it reaches end-of-life (EOL).
To learn more about MongoDB support for EOL products, see the Legacy Support Policy.
Version 1.28.0 Release Support Changes
This driver version drops support for MongoDB Server versions 3.6 and earlier. To use any driver from versions 1.28.0 and later, your MongoDB Server must be version 4.0 or later. This driver version supports MongoDB Server 8.0 features. To learn how to upgrade your MongoDB Server deployment, see Release Notes in the MongoDB Server manual.