Skip to content

Commit 3a7b2ef

Browse files
committed
Laravel 11 compatibility
1 parent 41d52c6 commit 3a7b2ef

File tree

6 files changed

+55
-14
lines changed

6 files changed

+55
-14
lines changed

.github/workflows/tests-maria.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,33 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18+
version: ["${{ inputs.version }}"]
1819
php: [8.1, 8.2, 8.3]
19-
laravel: [10.*]
20+
laravel: [10.*, 11.*]
2021
stability: [prefer-lowest, prefer-stable]
22+
exclude:
23+
# Laravel 11.x only supports PHP ^8.2
24+
- laravel: 11.*
25+
php: 8.1
26+
# Laravel 11.x required MariaDB 10.10+
27+
- laravel: 11.*
28+
version: 10.3
29+
- laravel: 11.*
30+
version: 10.4
31+
- laravel: 11.*
32+
version: 10.5
33+
- laravel: 11.*
34+
version: 10.6
35+
- laravel: 11.*
36+
version: 10.7
37+
- laravel: 11.*
38+
version: 10.8
39+
- laravel: 11.*
40+
version: 10.9
2141

2242
services:
2343
database:
24-
image: mariadb:${{ inputs.version }}
44+
image: mariadb:${{ matrix.version }}
2545
options: --health-cmd="healthcheck.sh --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
2646
env:
2747
MYSQL_ALLOW_EMPTY_PASSWORD: yes
@@ -55,6 +75,6 @@ jobs:
5575
- name: Execute tests
5676
run: vendor/bin/pest
5777
env:
58-
DB_CONNECTION: mysql
78+
DB_CONNECTION: ${{ matrix.laravel == '10.*' && 'mysql' || 'mariadb' }}
5979
DB_DATABASE: mysql
6080
DB_USERNAME: root

.github/workflows/tests-mysql.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
php: [8.1, 8.2, 8.3]
19-
laravel: [10.*]
19+
laravel: [10.*, 11.*]
2020
stability: [prefer-lowest, prefer-stable]
21+
exclude:
22+
# Laravel 11.x only supports PHP ^8.2
23+
- laravel: 11.*
24+
php: 8.1
2125

2226
services:
2327
database:
@@ -61,3 +65,4 @@ jobs:
6165
DB_DATABASE: testing
6266
DB_USERNAME: testing
6367
DB_PASSWORD: testing
68+
DB_COLLATION: ${{ inputs.version == '5.7' && 'utf8mb4_general_ci' || 'utf8mb4_0900_ai_ci' }}

.github/workflows/tests-pgsql.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
php: [8.1, 8.2, 8.3]
19-
laravel: [10.*]
19+
laravel: [10.*, 11.*]
2020
stability: [prefer-lowest, prefer-stable]
21+
exclude:
22+
# Laravel 11.x only supports PHP ^8.2
23+
- laravel: 11.*
24+
php: 8.1
2125

2226
services:
2327
database:
@@ -56,4 +60,6 @@ jobs:
5660
run: vendor/bin/pest
5761
env:
5862
DB_CONNECTION: pgsql
59-
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres
63+
DB_DATABASE: postgres
64+
DB_USERNAME: postgres
65+
DB_PASSWORD: postgres

.github/workflows/tests-sqlite.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ jobs:
1111
fail-fast: false
1212
matrix:
1313
php: [8.1, 8.2, 8.3]
14-
laravel: [10.*]
14+
laravel: [10.*, 11.*]
1515
stability: [prefer-lowest, prefer-stable]
16+
exclude:
17+
# Laravel 11.x only supports PHP ^8.2
18+
- laravel: 11.*
19+
php: 8.1
1620

1721
steps:
1822
- name: Checkout code

.github/workflows/tests-sqlsrv.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
php: [8.1, 8.2, 8.3]
19-
laravel: [10.*]
19+
laravel: [10.*, 11.*]
2020
stability: [prefer-lowest, prefer-stable]
21+
exclude:
22+
# Laravel 11.x only supports PHP ^8.2
23+
- laravel: 11.*
24+
php: 8.1
2125

2226
services:
2327
database:
@@ -57,4 +61,6 @@ jobs:
5761
run: vendor/bin/pest
5862
env:
5963
DB_CONNECTION: sqlsrv
60-
DATABASE_URL: sqlsrv://sa:Password_123@localhost:1433/master
64+
DB_DATABASE: master
65+
DB_USERNAME: sa
66+
DB_PASSWORD: Password_123

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
],
1919
"require": {
2020
"php": "^8.1",
21-
"illuminate/contracts": "^10.13.1",
22-
"illuminate/database": "^10.13.1",
23-
"illuminate/support": "^10.0"
21+
"illuminate/contracts": "^10.13.1|^11.0",
22+
"illuminate/database": "^10.13.1|^11.0",
23+
"illuminate/support": "^10.0|^11.0"
2424
},
2525
"require-dev": {
2626
"larastan/larastan": "^2.7.0",
2727
"laravel/pint": "^1.0",
28-
"nunomaduro/collision": "^7.0.0",
29-
"orchestra/testbench": "^8.0",
28+
"nunomaduro/collision": "^7.0|^8.0",
29+
"orchestra/testbench": "^8.0|^9.0",
3030
"pestphp/pest": "^2.28.1",
3131
"pestphp/pest-plugin-laravel": "^2.2.0",
3232
"phpstan/extension-installer": "^1.1",

0 commit comments

Comments
 (0)