You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MongoDB PHP team is happy to announce that version 5.0.0 of the MongoDB integration for Laravel is now available. This is a release candidate for which we'd like to receive your feedback.
Breaking changes for better compatibility with Laravel and Eloquent
id is always alias to _id in MongoDB. You can remove the protected $primaryKey = '_id' in model classes. Replace all $model->_id with $model->id.
DateTimeInterface objects (including Carbon) are converted to MongoDB UTCDateTime by the query builder in queries, inserted and updated data. In results, MongoDB UTCDateTime objects are automatically converted to Carbon date with the default timezone. Some Eloquent cast my no longer be required.
Results of the Query Builder are returned as stdClass instead of array. 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 and Queue\Failed\MongoFailedJobProvider are removed. Remove them from your application. The MongoDB connection is compatible with the Laravel classes
MongoDB\Laravel\Connection is replaced by MongoDB\Connection, and query are logged using MongoDB Monitoring Events.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The MongoDB PHP team is happy to announce that version 5.0.0 of the MongoDB integration for Laravel is now available. This is a release candidate for which we'd like to receive your feedback.
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.stdClass
instead ofarray
. Replace code like$item['name']
with$item->name
.$collection
is replaced by$table
to customize the name of an Eloquent Model.Auth\PasswordResetServiceProvider
,MongoDBQueueServiceProvider
andQueue\Failed\MongoFailedJobProvider
are removed. Remove them from your application. The MongoDB connection is compatible with the Laravel classesMongoDB\Laravel\Connection
is replaced byMongoDB\Connection
, and query are logged using MongoDB Monitoring Events.What's Changed
New Features
id
an alias for_id
by @GromNaN in PHPORM-147 Makeid
an alias for_id
#3040Other Changes
Blueprint::background()
by @GromNaN in PHPORM-157 RemoveBlueprint::background()
#3132New Contributors
Full Changelog: 4.8.0...5.0.0
This discussion was created from the release 5.0.0.
Beta Was this translation helpful? Give feedback.
All reactions