Skip to content

Commit 6c98cea

Browse files
authored
chore: Allow Laravel 12 and other improvements (#2282)
* chore: Allow Laravel 12 and other improvements * fix * bump mockery * fix lowest carbon * remove double run
1 parent 07fb753 commit 6c98cea

File tree

3 files changed

+23
-24
lines changed

3 files changed

+23
-24
lines changed

.github/workflows/phpunit.yml

+13-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: PHPUnit tests
22

33
on:
44
push:
5-
pull_request:
65
release:
76
types:
87
- published
@@ -15,23 +14,29 @@ jobs:
1514
fail-fast: false
1615
matrix:
1716
php: [8.0, 8.1, 8.2, 8.3, 8.4]
18-
laravel: [9.*, 10.*, 11.*]
17+
laravel: [9.*, 10.*, 11.*, 12.*]
1918
os: [ubuntu-latest]
2019
coverage: [none]
20+
stability: [prefer-lowest, prefer-stable]
2121
include:
22-
- php: 8.3
23-
laravel: 11.*
22+
- php: 8.4
23+
laravel: 12.*
2424
os: ubuntu-latest
2525
coverage: xdebug
26+
stability: prefer-stable
2627
exclude:
2728
- php: 8.0
2829
laravel: 10.*
2930
- php: 8.0
3031
laravel: 11.*
3132
- php: 8.1
3233
laravel: 11.*
34+
- php: 8.0
35+
laravel: 12.*
36+
- php: 8.1
37+
laravel: 12.*
3338

34-
name: '[P${{ matrix.php }}] [L${{ matrix.laravel }}] [${{ matrix.coverage }}]'
39+
name: PHP${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}
3540

3641
steps:
3742
- name: Checkout code
@@ -53,13 +58,13 @@ jobs:
5358
uses: actions/cache@v3
5459
with:
5560
path: ${{ steps.composer-cache.outputs.dir }}
56-
key: "php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}"
57-
restore-keys: "php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}"
61+
key: "php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-${{ matrix.stability }}-${{ hashFiles('**/composer.json') }}"
62+
restore-keys: "php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-${{ matrix.stability }}-${{ hashFiles('**/composer.json') }}"
5863

5964
- name: Install dependencies
6065
run: |
6166
composer require "illuminate/contracts:${{ matrix.laravel }}" --no-interaction --no-progress --no-update
62-
composer update --no-progress --prefer-dist --no-interaction
67+
composer update --${{ matrix.stability }} --no-progress --prefer-dist --no-interaction
6368
6469
- name: Execute tests
6570
run: composer test:ci

composer.json

+9-15
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@
2424
],
2525
"require": {
2626
"php": "^8.0",
27-
"illuminate/auth": "^9.0|^10.0|^11.0",
28-
"illuminate/contracts": "^9.0|^10.0|^11.0",
29-
"illuminate/http": "^9.0|^10.0|^11.0",
30-
"illuminate/support": "^9.0|^10.0|^11.0",
27+
"illuminate/auth": "^9.0|^10.0|^11.0|^12.0",
28+
"illuminate/contracts": "^9.0|^10.0|^11.0|^12.0",
29+
"illuminate/http": "^9.0|^10.0|^11.0|^12.0",
30+
"illuminate/support": "^9.0|^10.0|^11.0|^12.0",
3131
"lcobucci/jwt": "^4.0",
32-
"nesbot/carbon": "^2.0|^3.0"
32+
"nesbot/carbon": "^2.69|^3.0"
3333
},
3434
"require-dev": {
35-
"illuminate/console": "^9.0|^10.0|^11.0",
36-
"illuminate/database": "^9.0|^10.0|^11.0",
37-
"illuminate/routing": "^9.0|^10.0|^11.0",
38-
"mockery/mockery": ">=0.9.9",
35+
"illuminate/console": "^9.0|^10.0|^11.0|^12.0",
36+
"illuminate/database": "^9.0|^10.0|^11.0|^12.0",
37+
"illuminate/routing": "^9.0|^10.0|^11.0|^12.0",
38+
"mockery/mockery": "^1.6",
3939
"phpunit/phpunit": "^9.4"
4040
},
4141
"autoload": {
@@ -63,12 +63,6 @@
6363
]
6464
}
6565
},
66-
"funding": [
67-
{
68-
"type": "patreon",
69-
"url": "https://www.patreon.com/seantymon"
70-
}
71-
],
7266
"config": {
7367
"sort-packages": true
7468
},

src/Claims/Claim.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public function matches($value, $strict = true)
139139
* @return array
140140
*/
141141
#[\ReturnTypeWillChange]
142-
public function jsonSerialize()
142+
public function jsonSerialize(): mixed
143143
{
144144
return $this->toArray();
145145
}

0 commit comments

Comments
 (0)