MongoDB PHP Library 1.9.0 Released

The PHP team is happy to announce that version 1.9.0 of the MongoDB PHP library is now available. This release adds support for new features in MongoDB 5.0.

Release Highlights

The aggregate() methods now support a let option. A document may be specified to define variables that will then be accessible within the pipeline. This feature requires MongoDB 5.0 and is described in more detail in the aggregate command reference.

Database::createCollection() supports creation of time series collections using new timeseries and expireAfterSeconds options. This feature requires MongoDB 5.0 and is described in more detail in the create command reference.

The CollectionInfo class returned by Database::listCollections() has several new methods to improve access to the server’s result objects: getInfo() , getType() , and getIdIndex() . Additionally, the getCappedMax() , getCappedSize() , and isCapped() methods have been deprecated.

This release upgrades the mongodb extension requirement to 1.10.0. Support for PHP 7.0 has been removed and the library now requires PHP 7.1 or newer.

A complete list of resolved issues in this release may be found at:


Documentation for this library may be found at:


This library may be installed or upgraded with:

composer require mongodb/mongodb^1.9.0

Installation instructions for the mongodb extension may be found in the documentation.


Thanks for our community contributors for 1.9.0: