4.0.0
The MongoDB PHP team is happy to announce that version 4.0.0 of the MongoDB integration for Laravel 10 is now available.
Release Highlights
- Rename package to
mongodb/laravel-mongodb - Change namespace to
MongoDB\Laravel - Add classes to cast
ObjectIdand UUID instances 5105553 by @alcaeus. - Add
Query\Builder::toMql()to simplify comprehensive query tests ae3e0d5 by @GromNaN. - Fix
Query\Builder::whereNotto use MongoDB$noroperator e045fab by @GromNaN. - Fix
Query\Builder::whereBetweento acceptCarbon\Periodobject f729baa by @GromNaN. - Throw an exception for unsupported
Query\Buildermethods e1a83f4 by @GromNaN. - Throw an exception when
Query\Builder::orderBy()is used with invalid direction edd0871 by @GromNaN. - Throw an exception when
Query\Builder::push()is used incorrectly 19cf7a2 by @GromNaN. - Remove public property
Query\Builder::$paginatinge045fab by @GromNaN. - Remove call to deprecated
Collection::countforcountDocuments4514964 by @GromNaN. - Accept operators prefixed by
$inQuery\Builder::orWhere0fb83af by @GromNaN. - Remove
Query\Builder::whereAll($column, $values). UseQuery\Builder::where($column, 'all', $values)instead. 1d74dc3 by @GromNaN. - Fix validation of unique values when the validated value is found as part of an existing value. d5f1bb9 by @GromNaN.
- Support
%and_inlikeexpression ea89e86 by @GromNaN. - Change signature of
Query\Builder::__constructorto match the parent class #2570 by @GromNaN. - Fix Query on
whereDate,whereDay,whereMonth,whereYear,whereTimeto use MongoDB operators #2376 by @Davpyu and @GromNaN. Model::unset()does not persist the change. CallModel::save()to persist the change #2578 by @GromNaN.- Support delete one document with
Query\Builder::limit(1)->delete()#2591 by @GromNaN - Add trait
MongoDB\Laravel\Eloquent\MassPrunableto replace the Eloquent trait on MongoDB models #2598 by @GromNaN
Documentation
Documentation for this library may be found in the Readme.
Installation
This library may be installed or upgraded with:
composer require mongodb/laravel-mongodb:^4.0.0
Installation instructions for the mongodb extension may be found in the PHP.net documentation.