Skip to content

Commit 507e745

Browse files
committed
Support Laravel 12
1 parent 6f6d408 commit 507e745

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

.github/workflows/run-tests.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ jobs:
1717
matrix:
1818
os: [ ubuntu-latest, windows-latest, macos-latest ]
1919
php: [8.4, 8.3, 8.2, 8.1, 8.0 ]
20-
laravel: [ "11.*", "10.*", "9.*" ]
20+
laravel: [ "12.*", "11.*", "10.*", "9.*" ]
2121
dependency-version: [prefer-lowest, prefer-stable]
2222
include:
23+
- laravel: 12.*
24+
testbench: 10.*
2325
- laravel: 11.*
2426
testbench: 9.*
2527
- laravel: 10.*
@@ -31,6 +33,8 @@ jobs:
3133
php: 8.0
3234
- laravel: 11.*
3335
php: 8.1
36+
- laravel: 12.*
37+
php: 8.1
3438

3539
name: P${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}
3640

composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
],
1818
"require": {
1919
"guzzlehttp/guzzle": "^7.4",
20-
"illuminate/http": "^8.0|^9.0|^10.0|^11.0",
21-
"illuminate/support": "8.0|^9.0|^10.0|^11.0"
20+
"illuminate/http": "^8.0|^9.0|^10.0|^11.0|^12.0",
21+
"illuminate/support": "8.0|^9.0|^10.0|^11.0|^12.0"
2222
},
2323
"require-dev": {
24-
"orchestra/testbench": "^7.0|^8.0|^9.0",
24+
"orchestra/testbench": "^7.0|^8.0|^9.0|^10.0",
2525
"sajya/server": "^5.2|^6.0"
2626
},
2727
"autoload": {

tests/HttpClientTest.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Illuminate\Http\Client\Request;
88
use Illuminate\Support\Facades\Http;
99
use Sajya\Client\Client;
10-
use Sajya\Server\Guide;
1110

1211
class HttpClientTest extends TestCase
1312
{
@@ -88,7 +87,12 @@ protected function setUp(): void
8887
parent::setUp();
8988

9089
Http::fake(function (Request $request) {
91-
$guide = new Guide([FixtureProcedure::class]);
90+
91+
$app = class_exists(\Sajya\Server\App::class)
92+
? \Sajya\Server\App::class
93+
: \Sajya\Server\Guide::class;
94+
95+
$guide = new $app([FixtureProcedure::class]);
9296
$response = $guide->terminate($request->body());
9397

9498
return Http::response(json_encode($response, JSON_THROW_ON_ERROR));

0 commit comments

Comments
 (0)