Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 28 million developers.Sign up
We are happy to announce the immediate availability of Doctrine MongoDB Abstraction Layer 1.4.0.
Passing context options to the driver
With this release it's possible to pass driver options to the connection class, which will then be passed on to the MongoDB driver. For example, to pass a stream context with SSL context options, you could use the following code snippet:
$context = stream_context_create([ 'ssl' => [ 'allow_self_signed' => false, ] ]); $connection = new \Doctrine\MongoDB\Connection(null, , null, null, ['context' => $context]);
Passing multiple expressions to logical operators
addOr methods in the query and aggregation builders now take multiple expression objects. Instead of having to call the method repeatedly, you may call it once with multiple arguments:
// Before $builder ->addAnd($someExpression) ->addAnd($otherExpression); // After $builder->addAnd($someExpression, $otherExpression);
multiple methods in the query have been deprecated in favor of
updateMany. These deprecations help people using ODM prepare for the next version of ODM which will utilize the new MongoDB library API.
Bug fixes in this release
PHP version support
With this release, we have dropped support for PHP 5.5. Users using PHP 5.5 or older are encouraged to upgrade to a newer PHP version. If you are using PHP 7.0 or 7.1, you can use this library by adding a polyfill for
ext-mongo, like mongo-php-adapter.