Skip to content

Commit 5f1ceeb

Browse files
committed
Merge remote-tracking branch 'upstream/5.0' into DOCSP-41335-id-alias
2 parents 52928b5 + 807f5fa commit 5f1ceeb

23 files changed

+109
-405
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ This will help reviewers and should be a good start for the documentation.
77

88
- [ ] Add tests and ensure they pass
99
- [ ] Add an entry to the CHANGELOG.md file
10-
- [ ] Update documentation for new features

.github/workflows/build-ci.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
- "6.0"
2121
- "7.0"
2222
php:
23-
- "8.1"
2423
- "8.2"
2524
- "8.3"
2625
laravel:
27-
- "10.*"
2826
- "11.*"
27+
mode:
28+
- ""
2929
include:
30-
- php: "8.1"
31-
laravel: "10.*"
30+
- php: "8.2"
31+
laravel: "11.*"
3232
mongodb: "5.0"
3333
mode: "low-deps"
3434
os: "ubuntu-latest"
@@ -37,9 +37,6 @@ jobs:
3737
mongodb: "7.0"
3838
mode: "ignore-php-req"
3939
os: "ubuntu-latest"
40-
exclude:
41-
- php: "8.1"
42-
laravel: "11.*"
4340

4441
steps:
4542
- uses: "actions/checkout@v4"

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
strategy:
2222
matrix:
2323
php:
24-
- '8.1'
2524
- '8.2'
25+
- '8.3'
2626
steps:
2727
- name: Checkout
2828
uses: actions/checkout@v4

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ All notable changes to this project will be documented in this file.
33

44
## [5.0.0] - next
55

6+
* Remove support for Laravel 10 by @GromNaN in [#3123](https://github.com/mongodb/laravel-mongodb/pull/3123)
67
* **BREAKING CHANGE** Use `id` as an alias for `_id` in commands and queries for compatibility with Eloquent packages by @GromNaN in [#3040](https://github.com/mongodb/laravel-mongodb/pull/3040)
78
* **BREAKING CHANGE** Make Query\Builder return objects instead of array to match Laravel behavior by @GromNaN in [#3107](https://github.com/mongodb/laravel-mongodb/pull/3107)
9+
* **BREAKING CHANGE** In DB query results, convert BSON `UTCDateTime` objects into `Carbon` date with the default timezone by @GromNaN in [#3119](https://github.com/mongodb/laravel-mongodb/pull/3119)
10+
* Remove `MongoFailedJobProvider`, replaced by Laravel `DatabaseFailedJobProvider` by @GromNaN in [#3122](https://github.com/mongodb/laravel-mongodb/pull/3122)
11+
* Remove custom `PasswordResetServiceProvider`, use the default `DatabaseTokenRepository` by @GromNaN in [#3124](https://github.com/mongodb/laravel-mongodb/pull/3124)
12+
* Remove `Blueprint::background()` method by @GromNaN in [#3132](https://github.com/mongodb/laravel-mongodb/pull/3132)
813

914
## [4.8.0] - 2024-08-27
1015

composer.json

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,27 @@
2222
],
2323
"license": "MIT",
2424
"require": {
25-
"php": "^8.1",
25+
"php": "^8.2",
2626
"ext-mongodb": "^1.15",
2727
"composer-runtime-api": "^2.0.0",
28-
"illuminate/cache": "^10.36|^11",
29-
"illuminate/container": "^10.0|^11",
30-
"illuminate/database": "^10.30|^11",
31-
"illuminate/events": "^10.0|^11",
32-
"illuminate/support": "^10.0|^11",
28+
"illuminate/cache": "^11",
29+
"illuminate/container": "^11",
30+
"illuminate/database": "^11",
31+
"illuminate/events": "^11",
32+
"illuminate/support": "^11",
3333
"mongodb/mongodb": "^1.15"
3434
},
3535
"require-dev": {
3636
"mongodb/builder": "^0.2",
3737
"league/flysystem-gridfs": "^3.28",
3838
"league/flysystem-read-only": "^3.0",
39-
"phpunit/phpunit": "^10.3",
40-
"orchestra/testbench": "^8.0|^9.0",
39+
"phpunit/phpunit": "^10.5",
40+
"orchestra/testbench": "^9.0",
4141
"mockery/mockery": "^1.4.4",
4242
"doctrine/coding-standard": "12.0.x-dev",
4343
"spatie/laravel-query-builder": "^5.6",
4444
"phpstan/phpstan": "^1.10"
4545
},
46-
"conflict": {
47-
"illuminate/bus": "< 10.37.2"
48-
},
4946
"suggest": {
5047
"league/flysystem-gridfs": "Filesystem storage in MongoDB with GridFS",
5148
"mongodb/builder": "Provides a fluent aggregation builder for MongoDB pipelines"
@@ -68,7 +65,6 @@
6865
"laravel": {
6966
"providers": [
7067
"MongoDB\\Laravel\\MongoDBServiceProvider",
71-
"MongoDB\\Laravel\\MongoDBQueueServiceProvider",
7268
"MongoDB\\Laravel\\MongoDBBusServiceProvider"
7369
]
7470
}

docs/eloquent-models/model-class.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ type, to the Laravel ``datetime`` type.
216216
To learn more, see `Attribute Casting <https://laravel.com/docs/{+laravel-docs-version+}/eloquent-mutators#attribute-casting>`__
217217
in the Laravel documentation.
218218

219-
This conversion lets you use the PHP `DateTime <https://www.php.net/manual/en/class.datetime.php>`__
220-
or the `Carbon class <https://carbon.nesbot.com/docs/>`__ to work with dates
219+
This conversion lets you use the PHP `DateTime
220+
<https://www.php.net/manual/en/class.datetime.php>`__ class to work with dates
221221
in this field. The following example shows a Laravel query that uses the
222222
casting helper on the model to query for planets with a ``discovery_dt`` of
223223
less than three years ago:
@@ -226,6 +226,13 @@ less than three years ago:
226226

227227
Planet::where( 'discovery_dt', '>', new DateTime('-3 years'))->get();
228228

229+
.. note:: Carbon Date Class
230+
231+
Starting in {+odm-long+} v5.0, ``UTCDateTime`` BSON values in MongoDB
232+
are returned as `Carbon <https://carbon.nesbot.com/docs/>`__ date
233+
classes in query results. The {+odm-short+} applies the default
234+
timezone when performing this conversion.
235+
229236
To learn more about MongoDB's data types, see :manual:`BSON Types </reference/bson-types/>`
230237
in the Server manual.
231238

docs/query-builder.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,13 @@ query builder method to retrieve documents from the
355355
:start-after: begin query whereDate
356356
:end-before: end query whereDate
357357

358+
.. note:: Date Query Result Type
359+
360+
Starting in {+odm-long+} v5.0, ``UTCDateTime`` BSON values in MongoDB
361+
are returned as `Carbon <https://carbon.nesbot.com/docs/>`__ date
362+
classes in query results. The {+odm-short+} applies the default
363+
timezone when performing this conversion.
364+
358365
.. _laravel-query-builder-pattern:
359366

360367
Text Pattern Match Example

docs/upgrade.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Overview
2222

2323
On this page, you can learn how to upgrade {+odm-long+} to a new major version.
2424
This page also includes the changes you must make to your application to upgrade
25-
your object-document mapper (ODM) version without losing functionality, if applicable.
25+
your version of the {+odm-short+} without losing functionality, if applicable.
2626

2727
How to Upgrade
2828
--------------
@@ -61,6 +61,19 @@ version releases that introduced them. When upgrading library versions,
6161
address all the breaking changes between your current version and the
6262
planned upgrade version.
6363

64+
- :ref:`laravel-breaking-changes-v5.x`
65+
- :ref:`laravel-breaking-changes-v4.x`
66+
67+
.. _laravel-breaking-changes-v5.x:
68+
69+
Version 5.x Breaking Changes
70+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71+
72+
This library version introduces the following breaking changes:
73+
74+
- In query results, the library converts BSON ``UTCDateTime`` objects to ``Carbon``
75+
date classes, applying the default timezone.
76+
6477
.. _laravel-breaking-changes-v4.x:
6578

6679
Version 4.x Breaking Changes

src/Auth/DatabaseTokenRepository.php

Lines changed: 0 additions & 59 deletions
This file was deleted.

src/Auth/PasswordBrokerManager.php

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)