Skip to content

Commit f46daf7

Browse files
feat: Laravel 12.x Compatibility (#9)
1 parent 4d68f45 commit f46daf7

File tree

2 files changed

+44
-33
lines changed

2 files changed

+44
-33
lines changed

.github/workflows/tests.yml

Lines changed: 38 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ name: Tests
22

33
on:
44
push:
5-
branches: [ main, develop ]
5+
branches:
6+
- main
7+
- develop
68
pull_request:
7-
branches: [ main, develop ]
9+
branches:
10+
- main
11+
- develop
812

913
jobs:
1014
build:
@@ -15,30 +19,37 @@ jobs:
1519
fail-fast: true
1620
matrix:
1721
php: [8.2, 8.3, 8.4]
18-
core: ['4.3.2', '5.0.1']
22+
core: ['4.3.2', '5.2']
23+
laravel: [11, 12]
24+
exclude:
25+
- laravel: 12
26+
core: '4.3.2'
1927

2028
steps:
21-
- name: Checkout Code
22-
uses: actions/checkout@v4
23-
24-
- name: Setup PHP
25-
uses: shivammathur/setup-php@v2
26-
with:
27-
php-version: ${{ matrix.php }}
28-
extensions: dom, curl, libxml, mbstring, zip
29-
tools: composer:v2
30-
coverage: none
31-
ini-values: error_reporting=E_ALL
32-
33-
- name: Set Laravel JSON:API Core Version
34-
run: composer require "laravel-json-api/core:^${{ matrix.core }}" --no-update
35-
36-
- name: Install dependencies
37-
uses: nick-fields/retry@v3
38-
with:
39-
timeout_minutes: 5
40-
max_attempts: 5
41-
command: composer update --prefer-dist --no-interaction --no-progress
42-
43-
- name: Execute tests
44-
run: vendor/bin/phpunit
29+
- name: Checkout Code
30+
uses: actions/checkout@v4
31+
32+
- name: Setup PHP
33+
uses: shivammathur/setup-php@v2
34+
with:
35+
php-version: ${{ matrix.php }}
36+
extensions: dom, curl, libxml, mbstring, zip
37+
tools: composer:v2
38+
coverage: none
39+
ini-values: error_reporting=E_ALL
40+
41+
- name: Set Laravel JSON:API Core Version
42+
run: composer require "laravel-json-api/core:^${{ matrix.core }}" --no-update
43+
44+
- name: Set Laravel Version
45+
run: composer require "illuminate/contracts:^${{ matrix.laravel }}" --no-update
46+
47+
- name: Install dependencies
48+
uses: nick-fields/retry@v3
49+
with:
50+
timeout_minutes: 5
51+
max_attempts: 5
52+
command: composer update --prefer-dist --no-interaction --no-progress
53+
54+
- name: Execute tests
55+
run: vendor/bin/phpunit

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
"require": {
2626
"php": "^8.2",
2727
"ext-json": "*",
28-
"illuminate/contracts": "^11.0",
29-
"illuminate/pipeline": "^11.0",
30-
"illuminate/support": "^11.0",
28+
"illuminate/contracts": "^11.0|^12.0",
29+
"illuminate/pipeline": "^11.0|^12.0",
30+
"illuminate/support": "^11.0|^12.0",
3131
"laravel-json-api/core": "^4.3.2|^5.0.1"
3232
},
3333
"require-dev": {
34-
"orchestra/testbench": "^9.0",
35-
"phpunit/phpunit": "^10.5"
34+
"orchestra/testbench": "^9.0|^10.0",
35+
"phpunit/phpunit": "^10.5|^11.5.3"
3636
},
3737
"autoload": {
3838
"psr-4": {
@@ -54,7 +54,7 @@
5454
]
5555
}
5656
},
57-
"minimum-stability": "stable",
57+
"minimum-stability": "dev",
5858
"prefer-stable": true,
5959
"config": {
6060
"sort-packages": true

0 commit comments

Comments
 (0)