The PHP team is happy to announce that version 1.17.0 of the mongodb PHP extension is now available on PECL.
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.
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 is available on PHP.net.
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.