Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit dd69219

Browse files
Merge 5.0 into 5.x (#3155)
2 parents ce97048 + cf9c9b1 commit dd69219

File tree

4 files changed

+44
-40
lines changed

4 files changed

+44
-40
lines changed

‎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
@@ -124,41 +124,41 @@ This library version introduces the following breaking changes:
124124
older versions compared to v5.0:
125125

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

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

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

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

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /