Skip to content

5.0.0-RC1

Pre-release
Pre-release
Compare
Choose a tag to compare
@mongodb-dbx-release-bot mongodb-dbx-release-bot released this 09 Sep 07:45
· 10 commits to 5.0 since this release
6507279

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 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.

What's Changed

New Features

Other Changes

New Contributors

Full Changelog: 4.8.0...5.0.0-rc1