MongoDB PHP Library 1.8.0 released

The PHP team is happy to announce that version 1.8.0 of the MongoDB PHP library is now available. This library is a high-level abstraction for the mongodb extension.

Release Highlights

This release makes the library compatible with PHP 8.

With this release, errors that occur while copying GridFS stream contents will now cause an exception instead of relying on PHP to emit a warning. This primarily affects the downloadToStream, downloadToStreamByName, and uploadFromStream methods for MongoDB\GridFS\Bucket.

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


Documentation for this library may be found at:


If you encounter any bugs or issues with this library, please report them via this form:


This library may be installed or upgraded with:

composer require mongodb/mongodb^1.8.0

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

This invocation fails on

  • Ubuntu 20.04
  • PHP 7.4.3
  • Composer version 1.10.13 2020-09-09 11:46:34
$ composer require mongodb/mongodb^1.8.0                                                                                                                                                   
  Could not find a matching version of package mongodb/mongodb^1.8.0. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable).

However, editing the composer.json and calling composer update mongodb/mongodb works