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
ObjectId
and UUID instances 5105553 by @alcaeus. - Add
Query\Builder::toMql()
to simplify comprehensive query tests ae3e0d5 by @GromNaN. - Fix
Query\Builder::whereNot
to use MongoDB$nor
operator e045fab by @GromNaN. - Fix
Query\Builder::whereBetween
to acceptCarbon\Period
object f729baa by @GromNaN. - Throw an exception for unsupported
Query\Builder
methods 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::$paginating
e045fab by @GromNaN. - Remove call to deprecated
Collection::count
forcountDocuments
4514964 by @GromNaN. - Accept operators prefixed by
$
inQuery\Builder::orWhere
0fb83af 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_
inlike
expression ea89e86 by @GromNaN. - Change signature of
Query\Builder::__constructor
to match the parent class #2570 by @GromNaN. - Fix Query on
whereDate
,whereDay
,whereMonth
,whereYear
,whereTime
to 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\MassPrunable
to 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.