What's New
Learn about new features, improvements, and fixes introduced in the following versions of the MongoDB PHP Library:
What's New in 1.20
Important
MongoDB Server v3.6 End-of-Life
Support for MongoDB Server v3.6 is removed in this release of the library.
Adds support for MongoDB Server v8.0.
Adds support for Queryable Encryption (QE) range queries. To use this feature, your app must connect to MongoDB Server 8.0 or later. For more information about QE range queries, see Queryable Encryption in the MongoDB Server manual.
When a sharded cluster operation is unsuccessful, the library avoids selecting the same
mongos
server for operation retry attempts if othermongos
servers are available.When you create a KMIP data key, you can now specify the
delegated
option. If this option is set totrue
, the KMIP provider performs encryption and decryption of the data key locally, ensuring that the encryption key never leaves the KMIP server.
For more information about the changes in this version, see the v1.20 release notes on GitHub.
What's New in 1.19
This release of the PHP library contains no significant changes and was added to keep version parity with the PHP extension.
What's New in 1.18
Adds a new GridFS API to make it more convenient to work with files using PHP's existing filesystem functions. The
MongoDB\GridFS\Bucket::registerGlobalStreamWrapperAlias()
method may be used to register a global alias for a GridFS bucket. After doing so, files within that bucket can be accessed by using only a file URI (e.g. "gridfs://mybucket/hello.txt"). A demonstration of this API can be found in the gridfs_stream_wrapper.php example script.Adds
MongoDB\Client::addSubscriber()
andMongoDB\Client::removeSubscriber()
methods to theMongoDB\Client
class to make it easier to register monitoring classes scoped to the underlyingMongoDB\Driver\Manager
object.
To learn more about this release, see the v1.18 Release Notes on GitHub.
What's New in 1.17
Introduces a new "codec" API for converting BSON to and from PHP objects. More information on this feature may be found in the Codecs tutorial.
Adds
MongoDB\add_logger()
andMongoDB\remove_logger()
functions to the library. These functions allow applications to register a PSR-3 Logger to receive log messages emitted by the driver. Previously, logs were only available through the extension's mongodb.debugINI
setting.Introduces new
MongoDB\Collection
methods to create and manage Atlas Search indexes. Atlas Search indexes can be queried using the$search
aggregation pipeline stage, which is supported in all versions of the library. To learn more about Atlas Search indexes and the specifics of the$search
aggregation stage, see the Atlas Search indexes documentation and $search.Upgrades the
mongodb
extension requirement to 1.17.0. Support for PHP 7.2 and 7.3 has been removed and the library now requires PHP 7.4 or newer.
To learn more about this release, see the v1.17 Release Notes on GitHub.