Skip to content
This repository has been archived by the owner on Nov 11, 2020. It is now read-only.

1.4.0

Compare
Choose a tag to compare
@alcaeus alcaeus released this 22 Nov 19:09
· 98 commits to master since this release

We are happy to announce the immediate availability of Doctrine MongoDB Abstraction Layer 1.4.0.

Release highlights

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

The addAnd, addNor and 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);

Deprecations

The update and multiple methods in the query have been deprecated in favor of updateOne and 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

Notable fixes may be found in the changelog. A full list of issues and pull requests included in this release may be found in the 1.4.0 milestone.

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.