Skip to content

Commit e2ad461

Browse files
authored
Laravel 12.x Compatibility (#131)
1 parent 407e689 commit e2ad461

File tree

3 files changed

+26
-25
lines changed

3 files changed

+26
-25
lines changed

.github/workflows/phpstan.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ name: phpstan
22

33
on:
44
push:
5-
branches: [master]
5+
paths:
6+
- '**.php'
7+
- 'phpstan.neon.dist'
68
pull_request:
7-
branches: [master]
9+
paths:
10+
- '**.php'
11+
- 'phpstan.neon.dist'
812

913
jobs:
1014
phpstan:
@@ -17,22 +21,15 @@ jobs:
1721
- name: Setup PHP
1822
uses: shivammathur/setup-php@v2
1923
with:
20-
php-version: 8.2
24+
php-version: 8.3
2125

22-
- name: Cache Composer packages
23-
id: composer-cache
24-
uses: actions/cache@v4
25-
with:
26-
path: vendor
27-
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
28-
restore-keys: |
29-
${{ runner.os }}-php-
26+
- name: Install composer dependencies
27+
uses: ramsey/composer-install@v3
3028

31-
- name: Install dependencies
32-
if: steps.composer-cache.outputs.cache-hit != 'true'
29+
- name: Install larastan
3330
run: |
34-
composer install
35-
composer dump
31+
composer require "larastan/larastan" --no-interaction --no-update
32+
composer update --prefer-dist --no-interaction
3633
3734
- name: Run analyse phpstan
3835
run: vendor/bin/phpstan analyse --error-format github

.github/workflows/tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,20 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
php: [8.4, 8.3, 8.2, 8.1]
17-
laravel: ['10.*', '11.*']
17+
laravel: ['10.*', '11.*', '12.*']
1818
dependency-version: [prefer-stable]
1919
include:
2020
- laravel: 10.*
2121
testbench: 8.*
2222
- laravel: 11.*
2323
testbench: 9.*
24+
- laravel: 12.*
25+
testbench: 10.*
2426
exclude:
2527
- laravel: 11.*
2628
php: 8.1
29+
- laravel: 12.*
30+
php: 8.1
2731

2832
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
2933

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@
2121
"license": "MIT",
2222
"require": {
2323
"php": "^8.1",
24-
"illuminate/auth": "^10.0|^11.0",
25-
"illuminate/container": "^10.0|^11.0",
26-
"illuminate/contracts": "^10.0|^11.0",
27-
"illuminate/database": "^10.0|^11.0",
28-
"laravel/serializable-closure": "^1.0|^2.0"
24+
"illuminate/auth": "^10.0|^11.0|^12.0",
25+
"illuminate/container": "^10.0|^11.0|^12.0",
26+
"illuminate/contracts": "^10.0|^11.0|^12.0",
27+
"illuminate/database": "^10.0|^11.0|^12.0",
28+
"laravel/serializable-closure": "^1.0|^2.0",
29+
"laravel/framework": "12.*",
30+
"orchestra/testbench": "10.*"
2931
},
3032
"autoload": {
3133
"psr-4": {
@@ -48,10 +50,8 @@
4850
}
4951
},
5052
"require-dev": {
51-
"orchestra/testbench": "^7.0|^8.0|^9.0",
52-
"phpunit/phpunit": "^9.0|^10.5",
53-
"friendsofphp/php-cs-fixer": "^3.9",
54-
"larastan/larastan": "^2.0"
53+
"phpunit/phpunit": "^9.0|^10.5|^11.5",
54+
"friendsofphp/php-cs-fixer": "^3.9"
5555
},
5656
"minimum-stability": "dev",
5757
"prefer-stable": true

0 commit comments

Comments
 (0)