MongoDB PHP Library 1.10.0 Released

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

Release Highlights

Database::aggregate() and Collection::aggregate() now support executing $out and $merge pipelines on 5.0+ secondaries and will no longer force a primary read preference. If a pre-5.0 secondary would be selected, aggregate() will fall back to selecting a primary server.

New Database::renameCollection() and Collection::rename() methods were introduced, which abstract the renameCollection command.

This release upgrades the mongodb extension requirement to 1.11.0.

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.10.0

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


Thanks to our community contributors for 1.10.0: