MongoDB PHP Extension 1.15.0 Released

The PHP team is happy to announce that version 1.15.0 of the mongodb PHP extension is now available on PECL.

Release Highlights

Tentative return types have been added to interfaces throughout the extension. Applications that cannot declare a compatible return type in their implementations will need to specify a ReturnTypeWillChange attribute on each method in order to silence deprecation notices on PHP 8.1+.

This release adds several new methods to MongoDB\Driver\ClientEncryption, which facilitate key management operations on the key vault collection. These methods mirror the existing APIs found in the MongoDB shell.

Backed enumerations are now supported during BSON encoding and will serialize as their case value. Round-tripping a backed enum through BSON will require special handling (e.g. converting the value to a case using BackedEnum::from() ). Pure enums, which have no backed cases, cannot be directly serialized. Enums are prohibited from implementing MongoDB\BSON\Unserializable and MongoDB\BSON\Persistable, but may implement MongoDB\BSON\Serializable.

MongoDB\BSON\Binary::__construct() no longer requires a $type parameter and will default to Binary::TYPE_GENERIC .

This release upgrades our libbson and libmongoc dependencies to 1.23.1. The libmongocrypt dependency has been upgraded to 1.5.2.

A complete list of resolved issues in this release may be found in JIRA.


Documentation is available on


You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.15.0

or update with:

pecl upgrade mongodb-1.15.0

Windows binaries are attached to the GitHub release notes.

1 Like

This topic was automatically closed after 90 days. New replies are no longer allowed.