Skip to content

Commit 72221f5

Browse files
author
Chris Cho
authored
Merge branch 'mongodb:4.2' into DOCSP-37057-eloquent-schema-builder
2 parents ac4504c + e182c90 commit 72221f5

17 files changed

+528
-101
lines changed

.github/workflows/build-ci.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
build:
99
runs-on: "${{ matrix.os }}"
1010

11-
name: "PHP v${{ matrix.php }} with MongoDB ${{ matrix.mongodb }} ${{ matrix.mode }}"
11+
name: "PHP ${{ matrix.php }} Laravel ${{ matrix.laravel }} MongoDB ${{ matrix.mongodb }} ${{ matrix.mode }}"
1212

1313
strategy:
1414
matrix:
@@ -23,10 +23,17 @@ jobs:
2323
- "8.1"
2424
- "8.2"
2525
- "8.3"
26+
laravel:
27+
- "10.*"
28+
- "11.*"
2629
include:
2730
- php: "8.1"
31+
laravel: "10.*"
2832
mongodb: "5.0"
2933
mode: "low-deps"
34+
exclude:
35+
- php: "8.1"
36+
laravel: "11.*"
3037

3138
steps:
3239
- uses: "actions/checkout@v4"
@@ -58,6 +65,9 @@ jobs:
5865
if: ${{ runner.debug }}
5966
run: "docker version && env"
6067

68+
- name: "Restrict Laravel version"
69+
run: "composer require --dev --no-update 'laravel/framework:${{ matrix.laravel }}'"
70+
6171
- name: "Download Composer cache dependencies from cache"
6272
id: "composer-cache"
6373
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
@@ -70,8 +80,7 @@ jobs:
7080
restore-keys: "${{ matrix.os }}-composer-"
7181

7282
- name: "Install dependencies"
73-
run: composer update --no-interaction $([[ "${{ matrix.mode }}" == low-deps ]] && echo ' --prefer-lowest --prefer-stable')
74-
83+
run: composer update --no-interaction $([[ "${{ matrix.mode }}" == low-deps ]] && echo ' --prefer-lowest')
7584
- name: "Run tests"
7685
run: "./vendor/bin/phpunit --coverage-clover coverage.xml"
7786
env:

.github/workflows/merge-up.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Merge up
2+
3+
on:
4+
push:
5+
branches:
6+
- "[0-9]+.[0-9]+"
7+
8+
env:
9+
GH_TOKEN: ${{ secrets.MERGE_UP_TOKEN }}
10+
11+
jobs:
12+
merge-up:
13+
name: Create merge up pull request
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
id: checkout
19+
uses: actions/checkout@v4
20+
with:
21+
# fetch-depth 0 is required to fetch all branches, not just the branch being built
22+
fetch-depth: 0
23+
token: ${{ secrets.MERGE_UP_TOKEN }}
24+
25+
- name: Create pull request
26+
id: create-pull-request
27+
uses: alcaeus/automatic-merge-up-action@main
28+
with:
29+
ref: ${{ github.ref_name }}
30+
branchNamePattern: '<major>.<minor>'

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [unreleased]
5+
6+
7+
## [4.2.0] - 2024-12-14
8+
9+
* Add support for Laravel 11 by @GromNaN in [#2735](https://github.com/mongodb/laravel-mongodb/pull/2735)
10+
* Implement Model::createOrFirst() using findOneAndUpdate operation by @GromNaN in [#2742](https://github.com/mongodb/laravel-mongodb/pull/2742)
11+
412
## [4.1.3] - 2024-03-05
513

614
* Fix the timezone of `datetime` fields when they are read from the database. By @GromNaN in [#2739](https://github.com/mongodb/laravel-mongodb/pull/2739)

composer.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,21 @@
2424
"require": {
2525
"php": "^8.1",
2626
"ext-mongodb": "^1.15",
27-
"illuminate/support": "^10.0",
28-
"illuminate/container": "^10.0",
29-
"illuminate/database": "^10.30",
30-
"illuminate/events": "^10.0",
27+
"illuminate/support": "^10.0|^11",
28+
"illuminate/container": "^10.0|^11",
29+
"illuminate/database": "^10.30|^11",
30+
"illuminate/events": "^10.0|^11",
3131
"mongodb/mongodb": "^1.15"
3232
},
3333
"require-dev": {
3434
"phpunit/phpunit": "^10.3",
35-
"orchestra/testbench": "^8.0",
35+
"orchestra/testbench": "^8.0|^9.0",
3636
"mockery/mockery": "^1.4.4",
3737
"doctrine/coding-standard": "12.0.x-dev",
3838
"spatie/laravel-query-builder": "^5.6",
3939
"phpstan/phpstan": "^1.10"
4040
},
41+
"minimum-stability": "dev",
4142
"replace": {
4243
"jenssegers/mongodb": "self.version"
4344
},
@@ -66,9 +67,6 @@
6667
"cs:fix": "phpcbf"
6768
},
6869
"config": {
69-
"platform": {
70-
"php": "8.1"
71-
},
7270
"allow-plugins": {
7371
"dealerdirect/phpcodesniffer-composer-installer": true
7472
}

docs/compatibility.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ The following compatibility table specifies the versions of Laravel and
2323
.. include:: /includes/framework-compatibility-laravel.rst
2424

2525
To find compatibility information for unmaintained versions of {+odm-short+},
26-
see `Laravel Version Compatibility <https://github.com/mongodb/laravel-mongodb/blob/3.9/README.md#installation>`__
26+
see `Laravel Version Compatibility <{+mongodb-laravel-gh+}/blob/3.9/README.md#installation>`__
2727
on GitHub.

docs/includes/framework-compatibility-laravel.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,22 @@
33
:stub-columns: 1
44

55
* - {+odm-short+} Version
6+
- Laravel 11.x
67
- Laravel 10.x
78
- Laravel 9.x
89

10+
* - 4.2
11+
- ✓
12+
- ✓
13+
-
14+
915
* - 4.1
16+
-
1017
- ✓
1118
-
1219

1320
* - 4.0
21+
-
1422
- ✓
1523
-
1624

docs/index.txt

Lines changed: 8 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ Laravel MongoDB
1414
:maxdepth: 1
1515

1616
/quick-start
17+
Release Notes <https://github.com/mongodb/laravel-mongodb/releases/>
1718
/retrieve
1819
/eloquent-models
1920
/query-builder
2021
/user-authentication
2122
/queues
2223
/transactions
24+
/issues-and-help
2325
/compatibility
2426
/upgrade
2527

@@ -58,6 +60,12 @@ see the following content:
5860
- :ref:`laravel-queues`
5961
- :ref:`laravel-transactions`
6062

63+
Issues & Help
64+
-------------
65+
66+
Learn how to report bugs, contribute to the library, and find
67+
more resources in the :ref:`laravel-issues-and-help` section.
68+
6169
Compatibility
6270
-------------
6371

@@ -70,57 +78,4 @@ Upgrade Versions
7078
Learn what changes you might need to make to your application to upgrade
7179
versions in the :ref:`laravel-upgrading` section.
7280

73-
Reporting Issues
74-
----------------
75-
76-
We are lucky to have a vibrant PHP community that includes users of varying
77-
experience with MongoDB PHP Library and {+odm-short+}. To get support for
78-
general questions, search or post in the
79-
:community-forum:`MongoDB Community Forums <>`.
80-
81-
To learn more about MongoDB support options, see the
82-
`Technical Support <https://www.mongodb.org/about/support>`__ page.
83-
84-
85-
Bugs / Feature Requests
86-
-----------------------
87-
88-
If you've found a bug or want to see a new feature in {+odm-short+},
89-
please report it in the GitHub issues section of the
90-
`mongodb/laravel-mongodb <https://github.com/mongodb/laravel-mongodb>`__
91-
repository.
92-
93-
If you want to contribute code, see the following section for instructions on
94-
submitting pull requests.
95-
96-
To report a bug or request a new feature, perform the following steps:
97-
98-
1. Visit the `GitHub issues <https://github.com/mongodb/laravel-mongodb/issues>`__
99-
section and search for any similar issues or bugs.
100-
#. If you find a matching issue, you can reply to the thread to report that
101-
you have a similar issue or request.
102-
#. If you cannot find a matching issue, click :guilabel:`New issue` and select
103-
the appropriate issue type.
104-
#. If you selected "Bug report" or "Feature request", please provide as much
105-
information as possible about the issue. Click :guilabel:`Submit new issue`
106-
to complete your submission.
107-
108-
If you've identified a security vulnerability in any official MongoDB
109-
product, please report it according to the instructions found in the
110-
:manual:`Create a Vulnerability Report page </tutorial/create-a-vulnerability-report>`.
111-
112-
For general questions and support requests, please use one of MongoDB's
113-
:manual:`Technical Support </support/>` channels.
114-
115-
Pull Requests
116-
-------------
117-
118-
We are happy to accept contributions to help improve the {+odm-short+}.
119-
120-
We track current development in `PHPORM <https://jira.mongodb.org/projects/PHPORM/summary>`__
121-
MongoDB JIRA project.
122-
123-
To learn more about contributing to this project, see the
124-
`CONTRIBUTING.md <https://github.com/mongodb/laravel-mongodb/blob/4.1/CONTRIBUTING.md>`__
125-
guide on GitHub.
12681

docs/issues-and-help.txt

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
.. _laravel-issues-and-help:
2+
3+
=============
4+
Issues & Help
5+
=============
6+
7+
We are lucky to have a vibrant PHP community that includes users of varying
8+
experience with MongoDB PHP Library and {+odm-short+}. To get support for
9+
general questions, search or post in the
10+
:community-forum:`MongoDB PHP Community Forums </tag/php>`.
11+
12+
To learn more about MongoDB support options, see the
13+
`Technical Support <https://www.mongodb.org/about/support>`__ page.
14+
15+
Bugs / Feature Requests
16+
-----------------------
17+
18+
If you find a bug or want to see a new feature in {+odm-short+},
19+
please report it as a GitHub issue in the `mongodb/laravel-mongodb
20+
<{+mongodb-laravel-gh+}>`__ repository.
21+
22+
If you want to contribute code, see the :ref:`laravel-pull-requests` section
23+
for instructions on submitting pull requests.
24+
25+
To report a bug or request a new feature, perform the following steps:
26+
27+
1. Review the `GitHub issues list <{+mongodb-laravel-gh+}/issues>`__
28+
in the source repository and search for any existing issues that address your concern.
29+
#. If you find a matching issue, you can reply to the thread to report that
30+
you have a similar issue or request.
31+
#. If you cannot find a matching issue, click :guilabel:`New issue` and select
32+
the appropriate issue type.
33+
#. If you select "Bug report" or "Feature request" as the issue type, please provide as
34+
much information as possible about the issue. Click :guilabel:`Submit new issue`
35+
to complete your submission.
36+
37+
If you've identified a security vulnerability in any official MongoDB
38+
product, please report it according to the instructions found in the
39+
:manual:`Create a Vulnerability Report page </tutorial/create-a-vulnerability-report>`.
40+
41+
For general questions and support requests, please use one of MongoDB's
42+
:manual:`Technical Support </support/>` channels.
43+
44+
.. _laravel-pull-requests:
45+
46+
Pull Requests
47+
-------------
48+
49+
We are happy to accept contributions to help improve {+odm-short+}.
50+
51+
We track current development in `PHPORM <https://jira.mongodb.org/projects/PHPORM/summary>`__
52+
MongoDB JIRA project.
53+
54+
To learn more about contributing to this project, see the
55+
`CONTRIBUTING.md <{+mongodb-laravel-gh+}/blob/{+package-version+}/CONTRIBUTING.md>`__
56+
guide on GitHub.

docs/quick-start.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ read and write operations on the data.
3333

3434
You can learn how to set up a local Laravel development environment
3535
and perform CRUD operations by viewing the
36-
:mdbu-course:`Getting Started with Laravel and MongoDB </getting-started-with-laravel-and-mongodb>`
36+
:mdbu-course:`Getting Started with Laravel and MongoDB </courses/getting-started-with-laravel-and-mongodb>`
3737
MongoDB University Learning Byte.
3838

3939
If you prefer to connect to MongoDB by using the PHP Library driver without

0 commit comments

Comments
 (0)