All notable changes to this project will be documented in this file.
- Fix casting issues by @stubbo in #2705
- Move documentation to the mongodb.com domain at https://www.mongodb.com/docs/drivers/php/laravel-mongodb/current/
- PHPORM-100 Support query on numerical field names by @GromNaN in #2642
- Fix casting issue by @hans-thomas in #2653
- Upgrade minimum Laravel version to 10.30 by @GromNaN in #2665
- Handling single model in sync method by @hans-thomas in #2648
- BelongsToMany sync does't use configured keys by @hans-thomas in #2667
- morphTo relationship by @hans-thomas in #2669
- Datetime casting with custom format by @hans-thomas in #2658
- PHPORM-106 Implement pagination for groupBy queries by @GromNaN in #2672
- Add method
Connection::ping()
to check server connection by @hans-thomas in #2677 - PHPORM-119 Fix integration with Spatie Query Builder - Don't qualify field names in document models by @GromNaN in #2676
- Support renaming columns in migrations by @hans-thomas in #2682
- Add MorphToMany support by @hans-thomas in #2670
- PHPORM-6 Fix doc Builder::timeout applies to find query, not the cursor by @GromNaN in #2681
- Add test for the
$hidden
property by @Treggats in #2687 - Update
push
andpull
docs by @hans-thomas in #2685 - Hybrid support for BelongsToMany relationship by @hans-thomas in #2688
- Avoid unnecessary data fetch for exists method by @andersonls in #2692
- Hybrid support for MorphToMany relationship by @hans-thomas in #2690
- Reset
Model::$unset
when a model is saved or refreshed #2709 by @richardfila
- Fix compatibility with Laravel 10.30 #2661 by @Treggats
- PHPORM-101 Allow empty insert batch for consistency with Eloquent SQL #2661 by @GromNaN
4.0.1 skipped due to a mistake in the release process.
- Rename package to
mongodb/laravel-mongodb
- Change namespace to
MongoDB\Laravel
- Add classes to cast
ObjectId
andUUID
instances 5105553 by @alcaeus. - Add
Query\Builder::toMql()
to simplify comprehensive query tests ae3e0d5 by @GromNaN. - Fix
Query\Builder::whereNot
to use MongoDB$not
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
- Add single word name mutators #2438 by @RosemaryOrchard & @mrneatly.
- Check if queue service is disabled #2357 by @robjbrain.
- Fix getRelationQuery breaking changes #2263 by @divine.
- Apply fixes produced by php-cs-fixer #2250 by @divine.
- Add doesntExist to passthru #2194 by @simonschaufi.
- Add Model query whereDate support #2251 by @yexk.
- Add transaction free deleteAndRelease() method #2229 by @sodoardi.
- Add setDatabase to Jenssegers\Mongodb\Connection #2236 by @ThomasWestrelin.
- Check dates against DateTimeInterface instead of DateTime #2239 by @jeromegamez.
- Move from psr-0 to psr-4 #2247 by @divine.
- MongodbQueueServiceProvider does not use the DB Facade anymore #2149 by @curosmj.
- Add escape regex chars to DB Presence Verifier #1992 by @andrei-gafton-rtgt.
- Laravel 8 support by @divine.