Skip to content

Commit cc970ea

Browse files
committed
Merge remote-tracking branch 'upstream/5.0' into DOCSP-43530-result-id-field
2 parents 8d3b4cd + cf9c9b1 commit cc970ea

File tree

8 files changed

+63
-53
lines changed

8 files changed

+63
-53
lines changed

.github/workflows/build-ci.yml

Lines changed: 7 additions & 4 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"
2324
- "8.2"
2425
- "8.3"
2526
laravel:
27+
- "10.*"
2628
- "11.*"
27-
mode:
28-
- ""
2929
include:
30-
- php: "8.2"
31-
laravel: "11.*"
30+
- php: "8.1"
31+
laravel: "10.*"
3232
mongodb: "5.0"
3333
mode: "low-deps"
3434
os: "ubuntu-latest"
@@ -37,6 +37,9 @@ jobs:
3737
mongodb: "7.0"
3838
mode: "ignore-php-req"
3939
os: "ubuntu-latest"
40+
exclude:
41+
- php: "8.1"
42+
laravel: "11.*"
4043

4144
steps:
4245
- uses: "actions/checkout@v4"

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
strategy:
2222
matrix:
2323
php:
24+
- '8.1'
2425
- '8.2'
2526
- '8.3'
2627
steps:

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ All notable changes to this project will be documented in this file.
33

44
## [5.0.0] - 2024-09-12
55

6-
* Remove support for Laravel 10 by @GromNaN in [#3123](https://github.com/mongodb/laravel-mongodb/pull/3123)
76
* **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) and [#3136](https://github.com/mongodb/laravel-mongodb/pull/3136)
87
* **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)
98
* **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)

composer.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,31 @@
2222
],
2323
"license": "MIT",
2424
"require": {
25-
"php": "^8.2",
25+
"php": "^8.1",
2626
"ext-mongodb": "^1.15",
2727
"composer-runtime-api": "^2.0.0",
28-
"illuminate/cache": "^11",
29-
"illuminate/container": "^11",
30-
"illuminate/database": "^11",
31-
"illuminate/events": "^11",
32-
"illuminate/support": "^11",
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",
3333
"mongodb/mongodb": "^1.18"
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.5",
40-
"orchestra/testbench": "^9.0",
39+
"phpunit/phpunit": "^10.3",
40+
"orchestra/testbench": "^8.0|^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
"rector/rector": "^1.2"
4646
},
47+
"conflict": {
48+
"illuminate/bus": "< 10.37.2"
49+
},
4750
"suggest": {
4851
"league/flysystem-gridfs": "Filesystem storage in MongoDB with GridFS",
4952
"mongodb/builder": "Provides a fluent aggregation builder for MongoDB pipelines"

docs/compatibility.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Compatibility
1515
:class: singlecol
1616

1717
.. meta::
18-
:keywords: laravel 9, laravel 10, laravel 11, 4.0, 4.1, 4.2
18+
:keywords: laravel 9, laravel 10, laravel 11, 4.0, 4.1, 4.2, 5.0
1919

2020
Laravel Compatibility
2121
---------------------

docs/includes/framework-compatibility-laravel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- Laravel 10.x
88
- Laravel 9.x
99

10-
* - 4.2 to 4.8
10+
* - 4.2 to 5.0
1111
- ✓
1212
- ✓
1313
-

docs/index.txt

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
:maxdepth: 1
1515

1616
/quick-start
17-
/usage-examples
1817
Release Notes <https://github.com/mongodb/laravel-mongodb/releases/>
18+
/upgrade
19+
/usage-examples
1920
/fundamentals
2021
/eloquent-models
2122
/query-builder
@@ -27,7 +28,6 @@
2728
/issues-and-help
2829
/feature-compatibility
2930
/compatibility
30-
/upgrade
3131

3232
Introduction
3333
------------
@@ -52,6 +52,17 @@ Learn how to add the {+odm-short+} to a Laravel web application, connect to
5252
MongoDB hosted on MongoDB Atlas, and begin working with data in the
5353
:ref:`laravel-quick-start` section.
5454

55+
Upgrade Versions
56+
----------------
57+
58+
.. important::
59+
60+
{+odm-long+} v5.0 introduces breaking changes that might affect how you
61+
upgrade your application from a v4.x version.
62+
63+
Learn what changes you must make to your application to upgrade between
64+
major versions in the :ref:`laravel-upgrading` section.
65+
5566
Usage Examples
5667
--------------
5768

@@ -94,10 +105,3 @@ Compatibility
94105

95106
To learn more about which versions of {+odm-long+} and Laravel are
96107
compatible, see the :ref:`laravel-compatibility` section.
97-
98-
Upgrade Versions
99-
----------------
100-
101-
Learn what changes you must make to your application to upgrade versions in
102-
the :ref:`laravel-upgrading` section.
103-

docs/upgrade.txt

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -125,41 +125,41 @@ This library version introduces the following breaking changes:
125125
older versions compared to v5.0:
126126

127127
.. code-block:: php
128-
:emphasize-lines: 10-11
129-
130-
use MongoDB\Laravel\Eloquent\Model;
131-
132-
class User extends Model
133-
{
134-
protected $keyType = 'string';
135-
136-
// older versions
137-
protected $collection = 'app_user';
138-
139-
// v5.0
140-
protected $table = 'app_user';
141-
142-
...
143-
}
128+
:emphasize-lines: 10-11
129+
130+
use MongoDB\Laravel\Eloquent\Model;
131+
132+
class User extends Model
133+
{
134+
protected $keyType = 'string';
135+
136+
// older versions
137+
protected $collection = 'app_user';
138+
139+
// v5.0
140+
protected $table = 'app_user';
141+
142+
...
143+
}
144144

145145
This release also modifies the associated ``DB`` and ``Schema`` methods for
146146
accessing a MongoDB collection. The following code shows how to access the
147147
``app_user`` collection in older versions compared to v5.0:
148148

149149
.. code-block:: php
150-
:emphasize-lines: 9-11
151-
152-
use Illuminate\Support\Facades\Schema;
153-
use Illuminate\Support\Facades\DB;
154-
use MongoDB\Laravel\Schema\Blueprint;
155-
156-
// older versions
157-
Schema::collection('app_user', function (Blueprint $collection) { ... });
158-
DB::collection('app_user')->find($id);
159-
160-
// v5.0
161-
Schema::table('app_user', function (Blueprint $table) { ... });
162-
DB::table('app_user')->find($id);
150+
:emphasize-lines: 9-11
151+
152+
use Illuminate\Support\Facades\Schema;
153+
use Illuminate\Support\Facades\DB;
154+
use MongoDB\Laravel\Schema\Blueprint;
155+
156+
// older versions
157+
Schema::collection('app_user', function (Blueprint $collection) { ... });
158+
DB::collection('app_user')->find($id);
159+
160+
// v5.0
161+
Schema::table('app_user', function (Blueprint $table) { ... });
162+
DB::table('app_user')->find($id);
163163

164164
.. _laravel-breaking-changes-v4.x:
165165

0 commit comments

Comments
 (0)