Releases: mongodb/mongo-php-library
1.6.0
The PHP team is happy to announce that version 1.6.0 of the MongoDB PHP library is now available. This library is a high-level abstraction for the mongodb
extension.
Release Highlights
This release introduces classes and options to enable Client-Side Field Level Encryption. With this feature, sensitive data can be automatically encrypted (MongoDB Enterprise Edition only) or explicitly encrypted using the MongoDB\Driver\ClientEncryption
API.
The MongoDB\Collection::updateOne
, updateMany
, replaceOne
methods now support a hint
option to specify the index that should be used for the query. The option is also supported for update operations in bulk writes. This option requires MongoDB 4.2 or later.
This release deprecates using a JavaScript instance with scope when calling MongoDB\Collection::mapReduce
for the map
, reduce
, and finalize
options. Use the scope
option instead. The nonAtomic
and sharded
options for the $out
Map-Reduce argument are also deprecated.
Please note that this is the last minor release series that is compatible with PHP 5. Support for PHP 5 will be dropped in the upcoming 1.7.0 release.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12483&version=24317
Documentation
Documentation for this library may be found at:
https://docs.mongodb.com/php-library/
Feedback
If you encounter any bugs or issues with this library, please report them via this form:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12483&issuetype=1
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb^1.6.0
Installation instructions for the mongodb
extension may be found in the PHP.net documentation.
1.5.2
The PHP team is happy to announce that version 1.5.2 of the MongoDB PHP library is now available. This library is a high-level abstraction for the mongodb
extension.
Release Highlights
This release fixes a potential memory leak when using the MongoDB\Model\CachingIterator
class and tightens validation around the chunkSizeBytes
option for GridFS file uploads.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12483&version=24699
Documentation
Documentation for this library may be found at:
https://docs.mongodb.com/php-library/
Feedback
If you encounter any bugs or issues with this library, please report them via this form:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12483&issuetype=1
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb^1.5.2
Installation instructions for the mongodb
extension may be found in the PHP.net documentation.
1.5.1
The PHP team is happy to announce that version 1.5.1 of the MongoDB PHP library is now available. This library is a high-level abstraction for the mongodb
extension.
Release Highlights
This release fixes passing an aggregation pipeline to update operations in a bulk write. The distinct
helper in MongoDB\Collection
now also correctly inherits the collection's type map when it wasn't passed using the $options
argument.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12483&version=24300
Documentation
Documentation for this library may be found at:
https://docs.mongodb.com/php-library/
Feedback
If you encounter any bugs or issues with this library, please report them via this form:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12483&issuetype=1
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb^1.5.1
Installation instructions for the mongodb
extension may be found in the PHP.net documentation.
1.5.0
The PHP team is happy to announce that version 1.5.0 of the MongoDB PHP library is now available. This library is a high-level abstraction for the mongodb
extension. This release adds support for new features in MongoDB 4.2.
Release Highlights
Together with version 1.6.0 of the mongodb
extension, this release allows running multi-document transactions on sharded clusters when connected to MongoDB 4.2.
To make working with transactions easier, this release introduces a new, more convenient API for executing transactions. The new MongoDB\with_transaction()
function takes a MongoDB\Driver\Session
argument and a callback that will be run within a transaction for the given session. The function itself handles starting and committing the transaction, as well as handling any retryable errors that occur during the process.
Change stream iterators now provide a MongoDB\ChangeStream::getResumeToken()
method, which allows retrieving a token that can be used to resume the change stream after the current position. This token can be used with the resumeAfter
option, as well as the new startAfter
option introduced in MongoDB 4.2. The latter allows resuming a change stream after an "invalidate" event, such as dropping or renaming a collection.
Update methods (e.g. updateMany()
, findOneAndUpdate()
) now support passing an aggregation pipeline for the update
argument. This allows for more complex atomic updates than before. See Update with an Aggregation Pipeline in the MongoDB manual for more information on this new feature.
This release adds compatibility with PHP 7.4 and drops support for PHP 5.5.
This release upgrades the mongodb
extension requirement to 1.6.0.
A complete list of resolved issues in this release may be found at: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12483&version=21085
Documentation
Documentation for this library may be found at:
https://docs.mongodb.com/php-library/
Feedback
If you encounter any bugs or issues with this library, please report them via this form:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12483&issuetype=1
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb^1.5.0
Installation instructions for the mongodb
extension may be found in the PHP.net documentation.
Thanks
Thanks for our community contributors for this release:
1.4.3
The PHP team is happy to announce that version 1.4.3 of the MongoDB PHP library is now available. This library is a high-level abstraction for the mongodb
extension.
Release Highlights
This release addresses two bugs related to resuming a change stream during its iteration. The iteration key reported by the change stream is now properly incremented for an iteration event that resumes. Additionally, the resume token is now correctly updated on consecutive resume attempts.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12483&version=23304
Documentation
Documentation for this library may be found at:
https://docs.mongodb.com/php-library/
Feedback
If you encounter any bugs or issues with this library, please report them via this form:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12483&issuetype=1
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb^1.4.3
Installation instructions for the mongodb
extension may be found in the PHP.net documentation.
1.4.2
The PHP team is happy to announce that version 1.4.2 of the MongoDB PHP library is now available. This library is a high-level abstraction for the mongodb
extension.
Release Highlights
This releases addresses a bug where MongoDB\Collection::countDocuments()
would throw an exception if no documents are found. Some tests were improved too.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12483&version=21113
Documentation
Documentation for this library may be found at:
https://docs.mongodb.com/php-library/
Feedback
If you encounter any bugs or issues with this library, please report them via this form:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12483&issuetype=1
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb^1.4.2
Installation instructions for the mongodb
extension may be found in the PHP.net documentation.
1.4.1
The PHP team is happy to announce that version 1.4.1 of the MongoDB PHP library is now available. This library is a high-level abstraction for the mongodb
extension.
Release Highlights
This release contains a fix for cloning MongoDB\Model\BSONArray
and MongoDB\Model\BSONDocument
objects that contain uncloneable PHP objects.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12483&version=20988
Documentation
Documentation for this library may be found at:
https://docs.mongodb.com/php-library/
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb=^1.4.1
Installation instructions for the mongodb
extension may be found in the PHP.net documentation.
1.4.0
The PHP team is happy to announce that version 1.4.0 of the MongoDB PHP library is now available. This library is a high-level abstraction for the mongodb
extension. This release adds support for new features in MongoDB 4.0 and drops support for MongoDB 2.6 and earlier.
Release Highlights
MongoDB 4.0 introduces support for cluster-level and database-level change streams, which may be created via the new MongoDB\Client::watch()
and MongoDB\Database::watch()
methods, respectively. All change streams now support a startAtOperationTime
option, which can be used to specify an exact point in time for the change stream to begin. Additionally, the internal logic for resuming change streams after encountering an error has been improved.
New MongoDB\Collection::countDocuments()
and MongoDB\Collection::estimatedDocumentCount()
methods have been introduced. countDocuments()
may be executed within a transaction and should be preferred where an exact document count is required. estimatedDocumentCount()
cannot be executed within a transaction but may otherwise be used when an approximate, non-filtered count is acceptable. The MongoDB\Collection::count()
has been deprecated (in documentation only) due to its incompatibility with transactions and inaccuracy in sharded clusters. Users should note that countDocuments()
uses an aggregation pipeline instead of the count
command, so it does not support $where
, $near
, and $nearSphere
query operators accepted in a count()
filter (alternative syntax is discussed in the countDocuments()
documentation).
A MongoDB\Collection::explain()
method has been introduced as a helper for the explain
command, which may be used to explain operations such as find
, findAndModify
, update
, and others. MongoDB\Collection::aggregate()
now also supports an explain
option (note: the server's API for explaining aggregate
differs from other commands).
Several usability improvements were made for the library's model classes for database, collection, and index information. Additionally, a MongoDB\Database::modifyCollection()
method has been introduced as a wrapper for the collMod
command.
This release upgrades the mongodb
extension requirement to 1.5.0. Support for MongoDB 2.6 and earlier has been removed.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12483&version=19898
Documentation
Documentation for this library may be found at:
https://docs.mongodb.com/php-library/
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb=^1.4.0
Installation instructions for the mongodb
extension may be found in the PHP.net documentation.
1.3.2
The PHP team is happy to announce that version 1.3.2 of the MongoDB PHP library is now available. This library is a high-level abstraction for the mongodb
extension.
Release Highlights
This release contains fixes for session consistency in change streams and executing findAndModify
commands when a client-level read concern has been specified.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12483&version=20437
Documentation
Documentation for this library may be found at:
https://docs.mongodb.com/php-library/
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb=^1.3.2
Installation instructions for the mongodb
extension may be found in the PHP.net documentation.
1.3.1
The PHP team is happy to announce that version 1.3.1 of the MongoDB PHP library is now available. This library is a high-level abstraction for the mongodb
extension.
Release Highlights
This release contains fixes for key incrementing in ChangeStream::next()
and resume functionality in ChangeStream::rewind()
. Additionally, it includes a performance improvement for seeking forward in GridFS files.
A complete list of resolved issues in this release may be found at:
https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12483&version=19818
Documentation
Documentation for this library may be found at:
https://docs.mongodb.com/php-library/
Installation
This library may be installed or upgraded with:
composer require mongodb/mongodb=^1.3.1
Installation instructions for the mongodb
extension may be found in the PHP.net documentation.
Thanks
Thanks for our community contributors for this release: