Releases: mongodb/laravel-mongodb
Releases · mongodb/laravel-mongodb
5.0.0-RC1
The PHP team is happy to announce that version 5.0.0-RC1 of the MongoDB integration for Laravel is now available. This is a release candidate for which we'd like to receive your feedback in the discussion.
Breaking changes for better compatibility with Laravel and Eloquent
id
is always alias to_id
in MongoDB. You can remove theprotected $primaryKey = '_id'
in model classes. Replace all$model->_id
with$model->id
.DateTimeInterface
objects (includingCarbon
) are converted to MongoDBUTCDateTime
by the query builder in queries, inserted and updated data. In results, MongoDBUTCDateTime
objects are automatically converted toCarbon
date with the default timezone. Some Eloquent cast my no longer be required.- Results of the Query Builder are returned as
stdClass
instead ofarray
. Replace code like$item['name']
with$item->name
. $collection
is replaced by$table
to customize the name of an Eloquent Model.- The providers
Auth\PasswordResetServiceProvider
,MongoDBQueueServiceProvider
andQueue\Failed\MongoFailedJobProvider
are removed. Remove them from your application. The MongoDB connection is compatible with the Laravel classes MongoDB\Laravel\Connection
is replaced byMongoDB\Connection
, and query are logged using MongoDB Monitoring Events.
What's Changed
New Features
- PHPORM-147 Make
id
an alias for_id
by @GromNaN in #3040 - PHPORM-230 Convert DateTimeInterface to UTCDateTime in queries by @GromNaN in #3105
- PHPORM-216 Remove $collection setting from DocumentModel and Connecti… by @GromNaN in #3104
- PHPORM-229 Make Query\Builder return objects instead of array to match Laravel behavior by @GromNaN in #3107
- PHPORM-231 Remove MongoFailedJobProvider by @GromNaN in #3122
- Remove support for Laravel 10 by @GromNaN in #3123
- PHPORM-234 Convert dates in DB Query results by @GromNaN in #3119
- PHPORM-235 Remove custom DatabaseTokenRepository by @GromNaN in #3124
- PHPORM-56 Replace Collection proxy class with Driver monitoring by @GromNaN in #3137
Other Changes
- DOCSP-42794: Laravel Passport by @norareidy in #3113
- DOCSP-43115 - v4.8 compat by @mongoKart in #3125
- Update PR template by @GromNaN in #3121
- Remove MongoDBQueueServiceProvider in composer.json by @masterbater in #3131
- PHPORM-157 Remove
Blueprint::background()
by @GromNaN in #3132 - DOCSP-43158: carbon date values db query results by @rustagir in #3133
- PHPORM-236 Remove _id from query results by @GromNaN in #3136
- DOCSP-41335: Id field alias by @norareidy in #3042
- DOCSP-43172: Remove DatabaseTokenRepository class by @norareidy in #3130
New Contributors
- @masterbater made their first contribution in #3131
Full Changelog: 4.8.0...5.0.0-rc1
4.8.0
What's Changed
New Features
- Added two methods incrementEach and decrementEach by @SmallRuralDog in #2550
- PHPORM-232 Support whereLike and whereNotLike by @GromNaN in #3108
- Add ConnectionCount and DriverTitle for monitoring commands by @GromNaN in #3072
Fixed
- PHPORM-227 Fix single document upsert by @GromNaN in #3100
Other Changes
- PHPORM-219 Deprecate
Connection::collection()
andSchema::collection()
by @GromNaN in #3062 - PHPORM-220 Deprecate using the
$collection
property to customize the name by @GromNaN in #3064 - DOCSP-41680: Remove quick start buttons by @norareidy in #3081
- Fix wrong name for driver options in docs by @alcaeus in #3074
- Move code ownership for docs to Laravel Docs team by @alcaeus in #3090
- DOCSP-41621: upsert by @rustagir in #3089
- Fix missing bracket in config snippet by @hms5232 in #3095
- DOCSP-41741: incrementEach and decrementEach by @norareidy in #3088
- DOCSP-41557: New v4.7 commands and methods by @norareidy in #3084
- DOCSP-42155: adjust for updated source constants by @rustagir in #3110
- DOCSP-42818: wherelike and wherenotlike docs by @rustagir in #3114
New Contributors
- @SmallRuralDog made their first contribution in #2550
- @hms5232 made their first contribution in #3095
Full Changelog: 4.7.1...4.8.0
4.7.2
What's Changed
Fixed
- PHPORM-227 Fix single document upsert by @GromNaN in #3100
Other Changes
- DOCSP-41680: Remove quick start buttons by @norareidy in #3081
- Fix wrong name for driver options in docs by @alcaeus in #3074
- Move code ownership for docs to Laravel Docs team by @alcaeus in #3090
- DOCSP-41621: upsert by @rustagir in #3089
- DOCSP-41557: New v4.7 commands and methods by @norareidy in #3084
- DOCSP-42155: adjust for updated source constants by @rustagir in #3110
Full Changelog: 4.7.1...4.7.2
4.7.1
What's Changed
Fixed
- PHPORM-222 Register the
BusServiceProvider
whenBatchRepository
is built by @GromNaN in #3071
Full Changelog: 4.7.0...4.7.1
4.7.0
This release improves the compatibility with introspection features provided by Laravel (commands db:show
and db:table
) and the package barryvdh/laravel-ide-helper
.
What's Changed
New Features
- Add
Connection::getServerVersion()
by @GromNaN in #3043 - Add Schema
getTables()
by @GromNaN in #3044 - Add Schema
getColumns()
andgetIndexes()
by @GromNaN in #3045 - Add Schema
hasColumn()
andhasColumns()
method by @Alex-Belyi in #3001 - Add
Query\Builder::upsert()
by @GromNaN in #3053
Fixed
New Contributors
- @mcmorisi made their first contribution in #3036
- @Alex-Belyi made their first contribution in #3001
Full Changelog: 4.6.0...4.7.0
4.6.0
What's Changed
New Features
- Add
DocumentModel
trait to use any 3rd party model with MongoDB @GromNaN in #2580 - Add
HasSchemaVersion
trait to help implementing the schema versioning pattern @florianJacques in #3021 - Add support for Closure for Embed pagination @GromNaN in #3027
Other Changes
- PHPORM-175: Use foreign key name for MorphTo relationships by @jmikola in #3011
- DOCSP-41010: Fix transactions code example by @norareidy in #3016
- DOCSP-38380: array reads by @rustagir in #3028
- Use PHPUnit's Attributes instead of annotation by @GromNaN in #3035
New Contributors
- @jmikola made their first contribution in #3011
- @florianJacques made their first contribution in #3021
Full Changelog: 4.5.0...4.6.0
4.5.0
What's Changed
New Features
- PHPORM-186 GridFS adapter for Filesystem by @GromNaN in #2985
Other Changes
- Upload code scanning results to correct ref when releasing by @alcaeus in #3006
- Use full-report convenience action for SSDLC reports by @alcaeus in #3010
- DOCSP-39849: revise job batching docs by @rustagir in #2994
- Add link to filesystems docs by @GromNaN in #3009
Full Changelog: 4.4.1...4.5.0
4.4.1
What's Changed
Other Changes
- Update RELEASING.md by @GromNaN in #2990
- Update compatibility tables for v4.4 by @norareidy in #2995
- PHPORM-190: Update drivers-github-tools to v2 by @alcaeus in #2998
- PHPORM-185, PHPORM-191, PHPORM-192: Publish SSDLC assets on release by @alcaeus in #3004
Full Changelog: 4.4.0...4.4.1
4.4.0
What's Changed
New Features
- PHPORM-82 Support prefix for collection names by @GromNaN in #2930
- [fix] Prevent exception when connection is closed by @SanderMuller in #2967
- Improve error message for invalid configuration by @GromNaN in #2975
- Unset
_id: null
to let it be autogenerated by @GromNaN in #2969 - PHPORM-81 implement
mongodb
driver for batch by @GromNaN in #2904
Fixed
- Remove
@mixin
on Model class by @GromNaN in #2981 - PHPORM-180 Keep createOrFirst in 2 commands to simplify implementation by @GromNaN in #2984
Other Changes
- Fallback to jenssegers/mongodb package name when mongodb/laravel-mongodb is not installed by @GromNaN in #2920
- PHPORM-181: Add SBOM lite by @alcaeus in #2937
- PHPORM-184 Use fixed key for temporary setting nested field by @GromNaN in #2962
- PHPORM-179: Upload PHPStan report to GitHub Code Scanning by @alcaeus in #2965
New Contributors
- @mongoKart made their first contribution in #2938
- @SanderMuller made their first contribution in #2967
Full Changelog: 4.3.0...4.4.0
4.3.1
What's Changed
New Features
- [fix] Prevent exception when connection is closed by @SanderMuller in #2967
- Improve error message for invalid configuration by @GromNaN in #2975
Fixed
Other Changes
- Fallback to jenssegers/mongodb package name when mongodb/laravel-mongodb is not installed by @GromNaN in #2920
- PHPORM-181: Add SBOM lite by @alcaeus in #2937
- PHPORM-184 Use fixed key for temporary setting nested field by @GromNaN in #2962
- PHPORM-179: Upload PHPStan report to GitHub Code Scanning by @alcaeus in #2965
- PHPORM-153: Add automated release workflow by @alcaeus in #2964
New Contributors
- @mongoKart made their first contribution in #2938
- @SanderMuller made their first contribution in #2967
Full Changelog: 4.3.0...4.3.1