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

Published by jmikola over 3 years ago

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

Release Highlights

The Manager constructor now supports a serverApi option in its $driverOptions parameter. A ServerApi instance can be provided to this option to utilize the new Stable API feature in MongoDB 5.0 and later.

Azure Key Vault and Google Cloud Platform KMS are now supported as keystores for client-side field-level encryption. They may be configured via kmsProviders field of the autoEncryption driver option when constructing a Manager.

The driver no longer prohibits the use of dots and dollars in document fields names. Restrictions are now entirely enforced by the server. Although MongoDB 5.0 has relaxed several restrictions, features such as escaping syntax for queries have yet to be implemented. As such, users are still not encouraged to use dots and dollars in field names.

Subscribers can now be registered directly on Manager objects via Manager::addSubscriber() and removeSubscriber() methods. Subscribers registered in this manner will only receive events associated with the Manager(s) with which they are registered. The global functions can still be used to register Subscribers that will receive events for all Managers.

The Manager constructor now supports a disableClientPersistence option in its $driverOptions parameter. Specifying true for this option will prevent the PHP driver from re-using a previously persisted libmongoc client for the Manager. A new client will be created internally and will also be destroyed along with the Manager object instead of being persisted for future use within the same PHP/worker process. Disabling client persistence is not generally recommended.

The Session class now reports information about a running transaction in its debug output (e.g. var_dump()). The CursorId class now supports var_export() and __set_state().

This release upgrades our libbson and libmongoc dependencies to 1.18.0. The libmongocrypt dependency has been upgraded to 1.2.1. Support for PHP 7.0 has been removed and the extension now requires PHP 7.1 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=30261

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

or update with:

pecl upgrade mongodb-1.10.0

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

Thanks

Thanks for our community contributors for 1.10.0:

mongo-php-driver - 1.9.2

Published by jmikola over 3 years ago

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

Release Highlights

This release fixes an issue with MongoDB\BSON\toPHP() rewriting memory for its $typeMap argument. The bundled version of libbson and libmongoc has also been updated to 1.17.7.

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

Documentation

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

Feedback

We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6

Installation

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

pecl install mongodb-1.9.2

or update with:

pecl upgrade mongodb-1.9.2

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

mongo-php-driver - 1.10.0-alpha1

Published by alcaeus over 3 years ago

The PHP team is happy to announce that the first alpha release of version 1.10.0 of the mongodb PHP extension is now available on PECL.

Release Highlights

This release adds support for Stable API (which will be released with MongoDB 5.0), using Azure and GCP keystores for client-side field level encryption, and a new option to disable libmongoc client persistence when creating a new MongoDB\Driver\Manager instance.

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

Documentation

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

Feedback

We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6

Installation

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

pecl install mongodb-1.10.0alpha1

or update with:

pecl upgrade mongodb-1.10.0alpha1

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

mongo-php-driver - 1.9.1

Published by jmikola over 3 years ago

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

Release Highlights

This release fixes return values for Cursor::current() and key() when the cursor's position is invalid. It also addresses an issue where the PHP version information reported in the client metadata handshake could be truncated. The bundled version of libbson and libmongoc has also been updated to 1.17.4.

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

Documentation

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

Feedback

We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6

Installation

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

pecl install mongodb-1.9.1

or update with:

pecl upgrade mongodb-1.9.1

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

mongo-php-driver - 1.9.0

Published by alcaeus almost 4 years ago

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

Release Highlights

This release makes the extension compatible with PHP 8.

This release ensures that all functions in the extension throw MongoDB\Driver\Exception\InvalidArgumentException instead of emitting a PHP error or warning during argument parsing (e.g. E_WARNING). Previous versions of the driver generally only did this for constructors, which was inconsistent. Note that this behavior does not apply to cases where PHP throws an Error (e.g. TypeError), which is done more consistently in PHP 8 (see: Consistent Type Errors).

The MongoDB\Driver\Cursor class now implements the Iterator interface directly. This change was necessary to ensure consistent behavior across all supported PHP versions.

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

Documentation

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

Feedback

We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6

Installation

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

pecl install mongodb-1.9.0

or update with:

pecl upgrade mongodb-1.9.0

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

mongo-php-driver - 1.9.0-RC1

Published by alcaeus almost 4 years ago

The PHP team is happy to announce that the first release candidate for version 1.9.0 of the mongodb PHP extension is now available on PECL.

Release Highlights

This release makes the extension compatible with PHP 8.

This release also ensures that all argument errors are correctly exposed as MongoDB\Driver\Exception\InvalidArgumentException on PHP 7. PHP 8 handles argument checks differently, so extra arguments or wrong types will trigger built-in errors.

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

Documentation

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

Feedback

We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6

Installation

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

pecl install mongodb-1.9.0RC1

or update with:

pecl upgrade mongodb-1.9.0RC1

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

mongo-php-driver - 1.8.2

Published by alcaeus almost 4 years ago

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

Release Highlights

This release fixes compilation issues on AIX platforms. It updates the bundled libmongoc library to 1.17.2, which includes fixes for DNS lookups when using mongodb+srv:// connection strings.

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

Documentation

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

Feedback

We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6

Installation

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

pecl install mongodb-1.8.2

or update with:

pecl upgrade mongodb-1.8.2

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

mongo-php-driver - 1.8.1

Published by alcaeus about 4 years ago

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

Release Highlights

This release fixes a memory leak when committing transactions. It also fixes a bug where error labels attached to write concern errors were not exposed in exceptions.

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

Documentation

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

Feedback

We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6

Installation

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

pecl install mongodb-1.8.1

or update with:

pecl upgrade mongodb-1.8.1

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

mongo-php-driver - 1.8.0

Published by jmikola about 4 years ago

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

Release Highlights

This release introduces support for OCSP and OCSP stapling, which is used to validate the revocation status of TLS certificates. OCSP is enabled by default, but can be controlled via two new URI options: tlsDisableOCSPEndpointCheck and tlsDisableCertificateRevocationCheck. The existing tlsAllowInvalidCertificates and tlsInsecure URI options may also be used to disable OCSP.

The driver now supports a directConnection URI option, which can be used to control replica set discovery behavior when only a single host is provided in the connection string. By default, providing a single member in the connection string will establish a direct connection or discover additional members depending on whether the replicaSet option is omitted or present, respectively. This default behavior remains unchanged, but applications can now specify directConnection=false to force discovery to occur (if replicaSet is omitted) or specify directConnection=true to force a direct connection (if replicaSet is present).

The driver now supports Zstandard compression if it is available during compilation. Applications can opt into using Zstandard by specifying zstd in the compressors URI option, which is used to negotiate supported compression formats when connecting to MongoDB.

The ReadPreference constructor now supports a hedge option, which can be passed ['enabled' => true] to enable Hedged Reads when connected to a MongoDB 4.4 sharded cluster.

This release adds several authentication improvements. The driver supports the new MONGODB-AWS authentication mechanism, which can be used when connecting to a MongoDB Atlas cluster that has been configured to support authentication via AWS IAM credentials. Additionally, the driver now uses a shorter conversation with the server when authenticating with a SCRAM mechanism.

MongoDB\Driver\BulkWrite::update() now supports a hint option, which can be used with MongoDB 4.4 or later.

The Manager constructor now supports a driver option in its $driverOptions parameter, which can be used by wrapping drivers and libraries to append metadata (e.g. library name and version) to the server handshake.

This release upgrades our libbson and libmongoc dependencies to 1.17.0. Support for PHP 5.6 has been removed and the extension now requires PHP 7.0 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=24483

Documentation

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

Feedback

We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6

Installation

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

pecl install mongodb-1.8.0

or update with:

pecl upgrade mongodb-1.8.0

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

mongo-php-driver - 1.8.0RC1

Published by jmikola over 4 years ago

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

Release Highlights

This release adds additional validation of the directConnection URI option when specified via array options (i.e. second argument of the MongoDB\Driver\Manager constructor).

This release updates the bundled libbson and libmongoc libraries to 1.17.0-rc0.

As previously announced, this version drops compatibility with PHP 5.6 and requires PHP 7.0 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=29652

Documentation

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

Feedback

We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6

Installation

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

pecl install mongodb-1.8.0RC1

or update with:

pecl upgrade mongodb-1.8.0RC1

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

mongo-php-driver - 1.7.5

Published by alcaeus over 4 years ago

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

Release Highlights

This release fixes an issue where running a generic command incorrectly inherited a read preference from the manager.

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

Documentation

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

Feedback

We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6

Installation

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

pecl install mongodb

or update with:

pecl upgrade mongodb

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

mongo-php-driver - 1.8.0beta2

Published by jmikola over 4 years ago

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

Release Highlights

This beta release provides support for additional new features in MongoDB 4.4 following the previous 1.8.0beta1 release.

This release introduces support for OCSP and OCSP stapling, which is used to validate the revocation status of TLS certificates. OCSP is enabled by default, but can be controlled via two new URI options: tlsDisableOCSPEndpointCheck and tlsDisableCertificateRevocationCheck.

The driver now supports Zstandard compression if it is available during compilation. Applications can opt into using Zstandard by specifying zstd in the compressors URI option, which is used to negotiate supported compression formats when connecting to MongoDB.

The driver now supports a directConnection URI option, which can be used to control replica set discovery behavior when only a single host is provided in the connection string. By default, providing a single member in the connection string will establish a direct connection or discover additional members depending on whether the replicaSet option is omitted or present, respectively. This default behavior remains unchanged, but applications can now specify directConnection=false to force discovery to occur (if replicaSet is omitted) or specify directConnection=true to force a direct connection (if replicaSet is present).

The ReadPreference constructor now supports a hedge option, which can be passed ['enabled' => true] to enable Hedged Reads when connected to a MongoDB 4.4 sharded cluster.

This release also fixes a long-standing bug where the driver might segfault during shutdown while garbage-collecting a ReadConcern, ReadPreference, or WriteConcern object.

As previously announced, this version drops compatibility with PHP 5.6 and requires PHP 7.0 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=27582

Documentation

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

Feedback

We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6

Installation

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

pecl install mongodb-1.8.0beta2

or update with:

pecl upgrade mongodb-1.8.0beta2

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

mongo-php-driver - 1.8.0beta1

Published by alcaeus over 4 years ago

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

Release Highlights

This beta release provides support for new features in MongoDB 4.4.

For authentication, this release adds support for the new MONGODB-AWS authentication mechanism. The SCRAM mechanism now supports shorter conversation when authenticating with the server.

The delete command (and its helpers), delete operations in bulk writes, as well as findAndDelete operations now support specifying a hint option.

For drivers built on top of the extension, there is a new driver key in the driverOptions when creating a manager. This can be used to pass custom metadata for use during the server handshake.

As previously announced, this version drops compatibility with PHP 5.6, limiting support to PHP 7.0 and newer.

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

Documentation

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

Feedback

We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6

Installation

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

pecl install mongodb-1.8.0beta1

or update with:

pecl upgrade mongodb-1.8.0beta1

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

mongo-php-driver - 1.7.4

Published by alcaeus over 4 years ago

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

Release Highlights

This release fixes a compilation issues when using an SSL library installed in a non-standard directory.

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

Documentation

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

Feedback

We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6

Installation

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

pecl install mongodb

or update with:

pecl upgrade mongodb

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

mongo-php-driver - 1.7.3

Published by alcaeus over 4 years ago

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

Release Highlights

This release fixes a compilation issue on Alpine Linux. The libmongoc dependency has been updated to 1.16.2 to fix this issue.

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

Documentation

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

Feedback

We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6

Installation

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

pecl install mongodb

or update with:

pecl upgrade mongodb

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

mongo-php-driver - 1.7.2

Published by alcaeus over 4 years ago

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

Release Highlights

This release fixes compilation issues when compiling with client-side encryption on Alpine Linux. The libmongocrypt dependency has been updated to 1.0.3 to fix this issue.

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

Documentation

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

Feedback

We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6

Installation

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

pecl install mongodb

or update with:

pecl upgrade mongodb

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

mongo-php-driver - 1.7.1

Published by alcaeus over 4 years ago

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

Release Highlights

This release fixes a build issue when compiling against system libraries.

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

Documentation

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

Feedback

We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6

Installation

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

pecl install mongodb

or update with:

pecl upgrade mongodb

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

Thanks

Thanks for our community contributors for 1.7.1:

mongo-php-driver - 1.7.0

Published by alcaeus over 4 years ago

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

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. If the extension is compiled against system libraries, libmongocrypt must be installed for this feature to be enabled. The --with-mongodb-client-side-encryption configure switch can be used to control compilation of encryption features.

MongoDB\Driver\BulkWrite::update now supports a hint option, which can be used with MongoDB 4.2 or later.

MongoDB\Driver\ReadConcern, ReadPreference, and WriteConcern instances now support PHP serialization. All classes in the MongoDB\BSON namespace can now be cloned.

The MongoDB\Driver\ReadPreference class now exposes the read preference mode as a string through the getModeString method. This is preferred over calling getMode, which will be deprecated in a future release.

MongoDB\Driver\Session now exposes more detailed transaction information. Instead of only exposing whether a transaction is running, the current state of the transaction can now be obtained using the getTransactionState method. The getTransactionOptions method returns an array of options that the current transaction is using, based on options passed when creating the session object and starting the transaction.

When forking a process that is using a MongoDB\Driver\Manager instance, the underlying libmongoc client is now reset on the first operation in the child process. This prevents an issue where exiting the child can destroy cursors that the parent process may still be using.

Specifying any SSL or TLS option via the driverOptions parameter for MongoDB\Driver\Manager::__construct will now implicitly enable TLS, as is done for the corresponding URI options.

The wTimeout parameter for MongoDB\Driver\WriteConcern::__construct now accepts 64-bit values. On 32-bit systems, MongoDB\Driver\WriteConcern::getWtimeout will return a MongoDB\BSON\Int64 instance if the WriteConcern object was created with a wTimeout that exceeds the 32-bit range. On 64-bit systems, this method will always return an integer value.

The --with-libbson and --with-libmongoc configure switches have been deprecated. The new --with-mongodb-system-libs configure option should be used to enable compiling against system libraries instead of bundled versions of libbson, libmongoc, and libmongocrypt. The extension continues to use bundled libraries by default.

This release updates the bundled libbson and libmongoc libraries to 1.16.0. The bundled libmongocrypt library is version 1.0.1.

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.8.0 release.

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

Documentation

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

Feedback

We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6

Installation

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

pecl install mongodb

or update with:

pecl upgrade mongodb

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

mongo-php-driver - 1.6.1

Published by alcaeus almost 5 years ago

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

Release Highlights

This release fixes compilation for PHP 7.4 on Windows. The bundled libbson and libmongoc libraries were updated to 1.15.2.

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

Documentation

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

Feedback

We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6

Installation

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

pecl install mongodb

or update with:

pecl upgrade mongodb

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

Thanks

Thanks for our community contributors for 1.6.1:

mongo-php-driver - 1.6.0

Published by alcaeus about 5 years ago

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

Release Highlights

This release adds support for multi-document transactions on sharded clusters. When starting a transaction on a sharded cluster, the first operation executed within the transaction will pin the session to a specific mongos server, ensuring that all subsequent operations in the transaction will be sent to the same server. This server is exposed via the new MongoDB\Driver\Session::getServer() method. The MongoDB\Driver\Session::isInTransaction() method exposes whether a transaction is currently in progress (i.e. started but not yet committed or aborted).

The MongoDB\Driver\Exception\RuntimeException class now exposes error labels via the hasErrorLabel() method. This can be used to infer certain error categories, such as transient failures in transactions, which indicate that the transaction can be retried and may succeed on a subsequent attempt.

When connected to MongoDB 3.6 or later, the driver can now automatically retry queries and read commands executed with executeQuery() and executeReadCommand(), respectively, that fail due to a network error or replica set failover. Note that only initial queries and commands can be retried; getMore commands issued during cursor iteration are not retryable. This feature is controlled by a new retryReads URI option, which defaults to true.

As of this release, retryable writes are now enabled by default. Note that retryable writes are fundamentally incompatible with the MMAPv1 storage engine. Applications still relying on MMAPv1 should consider upgrading to WiredTiger or otherwise disable retryable writes explicitly by setting the retryWrites URI option to false.

MongoDB 4.2 introduced aggregation pipelines for updates, which allows for more expressive update statements (e.g. conditional updates based on current field values). To support this feature, BulkWrite::update() now accepts a pipeline array as its second argument.

Starting with this release, TLS options may be passed using the tls* URI options in either the connection string or array options to MongoDB\Driver\Manager::construct(). The use of driver options (i.e. third constructor argument) is still supported. The ca_dir option, its deprecated alias capath, and the crl_file option are not supported as URI options and still need to be passed as driver options.

This release upgrades our libbson and libmongoc dependencies to 1.15.1. Support for PHP 5.5 has been removed. The extension now supports all PHP versions from 5.6 through 7.4.

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

Documentation

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

Feedback

We would appreciate any feedback you might have on the project:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12484&issuetype=6

Installation

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

pecl install mongodb

or update with:

pecl upgrade mongodb

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