mongo-php-driver

The Official MongoDB PHP driver

APACHE-2.0 License

Downloads
3
Stars
839
Committers
33

Bot releases are hidden (Show)

mongo-php-driver - 1.17.2 Latest Release

Published by jmikola 10 months ago

The PHP team is happy to announce that version 1.17.2 of the mongodb PHP extension is now available on PECL.

Release Highlights

This release fixes a performance regression that was introduced in 1.17.0.

A complete list of resolved issues in this release may be found in JIRA.

Documentation

Documentation is available on PHP.net.

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.17.2

or update with:

pecl upgrade mongodb-1.17.2

Windows binaries are attached to the GitHub release notes.

mongo-php-driver - 1.17.1

Published by jmikola 11 months ago

The PHP team is happy to announce that version 1.17.1 of the mongodb PHP extension is now available on PECL.

Release Highlights

This release upgrades our libbson and libmongoc dependencies to 1.25.2.

A complete list of resolved issues in this release may be found in JIRA.

Documentation

Documentation is available on PHP.net.

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.17.1

or update with:

pecl upgrade mongodb-1.17.1

Windows binaries are attached to the GitHub release notes.

mongo-php-driver - 1.17.0

Published by jmikola 11 months ago

The PHP team is happy to announce that version 1.17.0 of the mongodb PHP extension is now available on PECL. This complements the 1.17.0 library release.

Release Highlights

With this release, the driver's configure options are now defined in the PECL package. Previously, a manual build from source was required to customize the build process. Running pecl install will now prompt for input for each configure option. This behavior may be undesirable for automated installations (e.g. CI or deployment scripts), but the prompts may be overcome by either piping input into the PECL command (e.g. yes '' | pecl install) or explicitly defining each configure option via arguments to pecl install. Both approaches are discussed in the PECL install docs.

When compiling the driver with bundled libmongoc on macOS, OpenSSL is now preferred by default. Previously, Secure Transport would be used by default. This change resolves possible segfaults when running PHP-FPM on macOS.

A MongoDB\Driver\Monitoring\LogSubscriber interface was introduced, which can be used to capture driver log messages. Implementing classes can be registered using the existing MongoDB\Driver\Monitoring\addSubscriber() function. Note that log subscribers are global and cannot be registered via MongoDB\Driver\Manager::addSubscriber().

MongoDB\BSON\PackedArray and MongoDB\BSON\Document now implement ArrayAccess. Additionally, MongoDB\BSON\Document allows fields to be accessed as properties. Note that both classes are still read-only and will throw when attempting to set or unset a field.

The tentative return type of MongoDB\BSON\Serializable::bsonSerialize() was changed to allow returning either an array, stdClass, MongoDB\BSON\Document, or MongoDB\BSON\PackedArray.

This release upgrades our libbson and libmongoc dependencies to 1.25.1. Support for PHP 7.2 and 7.3 has been removed and the extension now requires PHP 7.4 or newer.

A complete list of resolved issues in this release may be found in JIRA.

Documentation

Documentation is available on PHP.net.

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.17.0

or update with:

pecl upgrade mongodb-1.17.0

Windows binaries are attached to the GitHub release notes.

mongo-php-driver - 1.16.2

Published by jmikola about 1 year ago

The PHP team is happy to announce that version 1.16.1 of the mongodb PHP extension is now available on PECL.

Release Highlights

This release fixes build issue on some platforms (e.g. Alpine Linux) when compiling the driver with PHP 8.2+. Additionally, it includes an upstream fix from libmongoc to address a possible deadlock when communicating with a MongoDB server that is in the process of restarting.

This release upgrades our libbson and libmongoc dependencies to 1.24.3.

A complete list of resolved issues in this release may be found in JIRA.

Documentation

Documentation is available on PHP.net.

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.16.2

or update with:

pecl upgrade mongodb-1.16.2

Windows binaries are attached to the GitHub release notes.

mongo-php-driver - 1.16.1

Published by alcaeus over 1 year ago

The PHP team is happy to announce that version 1.16.1 of the mongodb PHP extension is now available on PECL.

Release Highlights

This release fixes a missing zlib dependency when installing the package from PECL.

A complete list of resolved issues in this release may be found in JIRA.

Documentation

Documentation is available on PHP.net.

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.16.1

or update with:

pecl upgrade mongodb-1.16.1

Windows binaries are attached to the GitHub release notes.

mongo-php-driver - 1.16.0

Published by jmikola over 1 year ago

The PHP team is happy to announce that version 1.16.0 of the mongodb PHP extension is now available on PECL. This release introduces support for MongoDB 7.0.

Release Highlights

This release introduces a backwards breaking change to the Queryable Encryption protocol. Using Queryable Encryption now requires MongoDB 7.0 or later.

MongoDB\BSON\Document and MongoDB\BSON\PackedArray classes have been introduced, which represent raw BSON data for documents and arrays, respectively. These classes can be instantiated via factory methods or by specifying bson in a type map. Iterating a Document or PackedArray will yield a MongoDB\BSON\Iterator object.

Several improvements were made to MongoDB\BSON\Int64. The class constructor has been made public and Int64 objects now support casting, comparison, and arithmetic operations. Int64 objects always encode as a 64-bit integer in BSON, so this change will allow applications more control over BSON encoding. There is no change to the driver's default BSON decoding behavior; however, the new Document and PackedArray classes will always return 64-bit BSON integers as Int64 objects.

This release upgrades our libbson and libmongoc dependencies to 1.24.1. The libmongocrypt dependency has been upgraded to 1.8.1.

A complete list of resolved issues in this release may be found in JIRA.

Documentation

Documentation is available on PHP.net.

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.16.0

or update with:

pecl upgrade mongodb-1.16.0

Windows binaries are attached to the GitHub release notes.

mongo-php-driver - 1.15.3

Published by jmikola over 1 year ago

The PHP team is happy to announce that version 1.15.3 of the mongodb PHP extension is now available on PECL.

Release Highlights

This release upgrades our libbson and libmongoc dependencies to 1.23.4, which fixes an issue with MONGODB-X509 authentication after a network error.

A complete list of resolved issues in this release may be found in JIRA.

Documentation

Documentation is available on PHP.net.

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.15.3

or update with:

pecl upgrade mongodb-1.15.3

Windows binaries are attached to the GitHub release notes.

mongo-php-driver - 1.15.2

Published by jmikola over 1 year ago

The PHP team is happy to announce that version 1.15.2 of the mongodb PHP extension is now available on PECL.

Release Highlights

This release upgrades our libbson and libmongoc dependencies to 1.23.3.

A complete list of resolved issues in this release may be found in JIRA.

Documentation

Documentation is available on PHP.net.

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.15.2

or update with:

pecl upgrade mongodb-1.15.2

Windows binaries are attached to the GitHub release notes.

mongo-php-driver - 1.15.1

Published by alcaeus over 1 year ago

The PHP team is happy to announce that version 1.15.1 of the mongodb PHP extension is now available on PECL.

Release Highlights

This release updates libmongoc to 1.23.2 and fixes a potential null pointer access when encountering a write concern error without an error message. It also ensures that Windows DLLs are built for all supported PHP versions.

A complete list of resolved issues in this release may be found in JIRA.

Documentation

Documentation is available on PHP.net.

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.15.1

or update with:

pecl upgrade mongodb-1.15.1

Windows binaries are attached to the GitHub release notes.

mongo-php-driver - 1.15.0

Published by jmikola almost 2 years ago

The PHP team is happy to announce that version 1.15.0 of the mongodb PHP extension is now available on PECL.

Release Highlights

Tentative return types have been added to interfaces throughout the extension. Applications that cannot declare a compatible return type in their implementations will need to specify a ReturnTypeWillChange attribute on each method in order to silence deprecation notices on PHP 8.1+.

This release adds several new methods to MongoDB\Driver\ClientEncryption, which facilitate key management operations on the key vault collection. These methods mirror the existing APIs found in the MongoDB shell.

Backed enumerations are now supported during BSON encoding and will serialize as their case value. Round-tripping a backed enum through BSON will require special handling (e.g. converting the value to a case using BackedEnum::from()). Pure enums, which have no backed cases, cannot be directly serialized. Enums are prohibited from implementing MongoDB\BSON\Unserializable and MongoDB\BSON\Persistable, but may implement MongoDB\BSON\Serializable.

MongoDB\BSON\Binary::__construct() no longer requires a $type parameter and will default to Binary::TYPE_GENERIC.

This release upgrades our libbson and libmongoc dependencies to 1.23.1. The libmongocrypt dependency has been upgraded to 1.5.2.

A complete list of resolved issues in this release may be found in JIRA.

Documentation

Documentation is available on PHP.net.

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.15.0

or update with:

pecl upgrade mongodb-1.15.0

Windows binaries are attached to the GitHub release notes.

Thanks

Thanks to our community contributors for 1.15.0:

mongo-php-driver - 1.14.2

Published by jmikola almost 2 years ago

The PHP team is happy to announce that version 1.14.2 of the mongodb PHP extension is now available on PECL.

Release Highlights

This release fixes a build issue where libresolv was not correctly linked on some platforms (e.g. Ubuntu 22.04).

This release upgrades our libbson and libmongoc dependencies to 1.22.2. This notably fixes a build issue on Alpine Linux and a separate bug that prevented the driver from connecting to Atlas Data Lake, both of which were introduced in libmongoc 1.22.0 (i.e. ext-mongodb 1.14.0).

A complete list of resolved issues in this release may be found in JIRA.

Documentation

Documentation is available on PHP.net.

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.14.2

or update with:

pecl upgrade mongodb-1.14.2
mongo-php-driver - 1.14.1

Published by jmikola about 2 years ago

The PHP team is happy to announce that version 1.14.1 of the mongodb PHP extension is now available on PECL.

Release Highlights

This release upgrades our libbson and libmongoc dependencies to 1.22.1. The libmongocrypt dependency has been upgraded to 1.5.2.

A complete list of resolved issues in this release may be found in JIRA.

Documentation

Documentation is available on PHP.net.

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.14.1

or update with:

pecl upgrade mongodb-1.14.1

Windows binaries are available on PECL.

mongo-php-driver - 1.14.0

Published by jmikola over 2 years ago

The PHP team is happy to announce that version 1.14.0 of the mongodb PHP extension is now available on PECL. This release introduces support for MongoDB 6.0 and Queryable Encryption.

Release Highlights

To support Queryable Encryption, encryptedFieldsMap and bypassQueryAnalysis auto encryption options have been added to MongoDB\Driver\Manager::__construct(). Additionally, new algorithms and a queryType option have been added to MongoDB\Driver\ClientEncryption::encrypt(). Support for the Automatic Encryption Shared Library, an alternative to mongocryptd, has also been introduced.

MongoDB\Driver\BulkWrite and MongoDB\Driver\Query support a let option for defining variables that can be accessed within query filters and updates. Additionally, both classes now support a comment option of any type (previously a string comment was only supported for queries).

This release upgrades our libbson and libmongoc dependencies to 1.22.0. The libmongocrypt dependency has been upgraded to 1.5.0.

A complete list of resolved issues in this release may be found in JIRA.

Documentation

Documentation is available on PHP.net.

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.14.0

or update with:

pecl upgrade mongodb-1.14.0

Windows binaries are available on PECL.

mongo-php-driver - 1.14.0beta1

Published by jmikola over 2 years ago

The PHP team is happy to announce that version 1.14.0beta1 of the mongodb PHP extension is now available on PECL. This release introduces support for MongoDB 6.0 and Queryable Encryption.

Release Highlights

To support Queryable Encryption, encryptedFieldsMap and bypassQueryAnalysis auto encryption options have been added to MongoDB\Driver\Manager::__construct(). Additionally, new algorithms and a queryType option have been added to MongoDB\Driver\ClientEncryption::encrypt().

MongoDB\Driver\BulkWrite and MongoDB\Driver\Query support a let option for defining variables that can be accessed within query filters and updates. Additionally, both classes now support a comment option of any type (previously a string comment was only supported for queries).

This release upgrades our libbson and libmongoc dependencies to 1.22.0-beta0. The libmongocrypt dependency has been upgraded to 1.5.0-rc1.

A complete list of resolved issues in this release may be found at: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=34002

Documentation

Documentation is available on PHP.net:
http://php.net/set.mongodb

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.14.0beta1

or update with:

pecl upgrade mongodb-1.14.0beta1

Windows binaries are available on PECL:
http://pecl.php.net/package/mongodb

mongo-php-driver - 1.13.0

Published by jmikola over 2 years ago

The PHP team is happy to announce that version 1.13.0 of the mongodb PHP extension is now available on PECL.

Release Highlights

MongoDB\Driver\Manager::__construct() supports two new URI options: srvMaxHosts and srvServiceName. srvMaxHosts may be used with sharded clusters to limit the number of hosts that will be added to a seed list following the initial SRV lookup. srvServiceName may be used with self-managed deployments to customize the default service name (i.e. "mongodb").

This release introduces support for SDAM Monitoring, which applications can use to monitor internal driver behavior for server discovery and monitoring. Similar to the existing command monitoring API, applications can implement the MongoDB\Driver\Monitoring\SDAMSubscriber interface and registering the subscriber globally or for a single Manager using MongoDB\Driver\Monitoring\addSubscriber() or MongoDB\Driver\Manager::addSubscriber, respectively. In addition to many new event classes, this feature introduces the ServerDescription and TopologyDescription classes.

This release upgrades our libbson and libmongoc dependencies to 1.21.1. The libmongocrypt dependency has been upgraded to 1.3.2. Support for MongoDB 3.4 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=12484&version=32494

Documentation

Documentation is available on PHP.net:
http://php.net/set.mongodb

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.13.0

or update with:

pecl upgrade mongodb-1.13.0

Windows binaries are available on PECL:
http://pecl.php.net/package/mongodb

Thanks

Thanks for our community contributors for 1.13.0:

mongo-php-driver - 1.12.1

Published by jmikola over 2 years ago

The PHP team is happy to announce that version 1.12.1 of the mongodb PHP extension is now available on PECL.

Release Highlights

This release upgrades our libbson and libmongoc dependencies to 1.20.1, which fixes a bug related to Atlas Serverless connections.

A complete list of resolved issues in this release may be found at: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=32724

Documentation

Documentation is available on PHP.net:
http://php.net/set.mongodb

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.12.1

or update with:

pecl upgrade mongodb-1.12.1

Windows binaries are available on PECL:
http://pecl.php.net/package/mongodb

mongo-php-driver - 1.12.0

Published by jmikola almost 3 years ago

The PHP team is happy to announce that version 1.12.0 of the mongodb PHP extension is now available on PECL.

Release Highlights

Building upon work done in the previous 1.11.0 release, this release completes compatibility with PHP 8.1.0. Classes with __toString() methods now specify a string return type and implement Stringable for PHP 8.0+. Interfaces with __toString() methods now specify tentative return type info.

This release adds support for KMIP keystores when using client-side field level encryption. Additionally, TLS options may now be specified when configuring a keystore. These improvements apply to both the autoEncryption driver option for MongoDB\Driver\Manager::__construct() and
Manager::createClientEncryption() method.

This release upgrades our libbson and libmongoc dependencies to 1.20.0. The libmongocrypt dependency has been upgraded to 1.3.0. Support for PHP 7.1 has been removed and the extension now requires PHP 7.2 or newer.

A complete list of resolved issues in this release may be found at: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=31694

Documentation

Documentation is available on PHP.net:
http://php.net/set.mongodb

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.12.0

or update with:

pecl upgrade mongodb-1.12.0

Windows binaries are available on PECL:
http://pecl.php.net/package/mongodb

mongo-php-driver - 1.11.1

Published by jmikola almost 3 years ago

The PHP team is happy to announce that version 1.11.1 of the mongodb PHP extension is now available on PECL.

Release Highlights

This release fixes a package requirement when libmongoc is used as a system library.

A complete list of resolved issues in this release may be found at: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=32003

Documentation

Documentation is available on PHP.net:
http://php.net/set.mongodb

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.11.1

or update with:

pecl upgrade mongodb-1.11.1

Windows binaries are available on PECL:
http://pecl.php.net/package/mongodb

mongo-php-driver - 1.11.0

Published by jmikola almost 3 years ago

The PHP team is happy to announce that version 1.11.0 of the mongodb PHP extension is now available on PECL. This release completes support for new features in MongoDB 5.0.

Release Highlights

Manager::startSession() now supports a snapshot option, which allows read concern "snapshot" to be used for certain read operations outside of multi-document transactions on MongoDB 5.0+.

The driver now supports a loadBalanced URI option, which may be used when connecting to a MongoDB cluster behind a load balancer (e.g. Atlas Serverless).

Manager::selectServer() no longer requires a ReadPreference parameter. By default, the method will now attempt to select a primary server.

This release is compatible with PHP 8.1.0RC5 and adds support for the new custom object serialization mechanism introduced in PHP 7.4, which is now required with PHP 8.1 phasing out Serializable. Extensions classes that support serialization now implement __serialize() and __unserialize() methods to support the new format, in addition to retaining support for the old format (i.e. Serializable interface).

This release upgrades our libbson and libmongoc dependencies to 1.19.1.

A complete list of resolved issues in this release may be found at: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=31529

Documentation

Documentation is available on PHP.net:
http://php.net/set.mongodb

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.11.0

or update with:

pecl upgrade mongodb-1.11.0

Windows binaries are available on PECL:
http://pecl.php.net/package/mongodb

mongo-php-driver - 1.11.0alpha1

Published by jmikola about 3 years ago

The PHP team is happy to announce that version 1.11.0alpha1 of the mongodb PHP extension is now available on PECL.

Release Highlights

This release makes the extension compatible with PHP 8.1.0RC1. This primarily adds support for the new custom object serialization mechanism introduced in PHP 7.4, which is now required with PHP 8.1 phasing out Serializable. Extensions classes that support serialization now implement __serialize() and __unserialize() methods to support the new format, in addition to retaining support for the old format (i.e. Serializable interface).

Manager::startSession() supports a snapshot option, which allows read concern "snapshot" to be used for certain read operations outside of multi-document transactions on MongoDB 5.0+.

This release upgrades our libbson and libmongoc dependencies to 1.19.0.

A complete list of resolved issues in this release may be found at: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12484&version=32025

Documentation

Documentation is available on PHP.net:
http://php.net/set.mongodb

Installation

You can either download and install the source manually, or you can install the extension with:

pecl install mongodb-1.11.0alpha1

or update with:

pecl upgrade mongodb-1.11.0alpha1

Windows binaries are available on PECL:
http://pecl.php.net/package/mongodb