From 677803ba14d07cf94273230299e66a6e56a7ea7e Mon Sep 17 00:00:00 2001 From: eden Date: Fri, 8 Mar 2024 15:36:18 +0100 Subject: [PATCH] Laravel 11 support --- .github/workflows/run-tests.yml | 4 +++- composer.json | 8 ++++---- phpstan.neon | 2 +- src/Debug/Debug.php | 2 +- src/Debug/DebugMiddleware.php | 2 +- src/Faker/Image.php | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 2a60423..e0eadc7 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -11,11 +11,13 @@ jobs: matrix: os: [ ubuntu-latest ] php: [ 8.2, 8.3 ] - laravel: [ ^10.0 ] + laravel: [ ^10.0, ^11.0 ] dependency-version: [ prefer-lowest, prefer-stable ] include: - laravel: ^10.0 testbench: ^8.0 + - laravel: 11.* + testbench: 9.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} diff --git a/composer.json b/composer.json index 97c520a..eada1c9 100644 --- a/composer.json +++ b/composer.json @@ -16,14 +16,14 @@ ], "require": { "php": "^8.2", - "illuminate/http": "^10.15", - "illuminate/support": "^10.15" + "illuminate/http": "^10.15 || ^11.0", + "illuminate/support": "^10.15 || ^11.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.13", "intervention/image": "^2.5.0", - "nunomaduro/larastan": "^2.3", - "orchestra/testbench": "^8.0", + "larastan/larastan": "^2.3", + "orchestra/testbench": "^8.0 || ^9.0", "phpunit/phpunit": "^10.4" }, "suggest": { diff --git a/phpstan.neon b/phpstan.neon index e39cefd..3387425 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,5 @@ includes: - - ./vendor/nunomaduro/larastan/extension.neon + - ./vendor/larastan/larastan/extension.neon - phpstan-baseline.neon parameters: diff --git a/src/Debug/Debug.php b/src/Debug/Debug.php index 230a389..3798a7f 100644 --- a/src/Debug/Debug.php +++ b/src/Debug/Debug.php @@ -17,7 +17,7 @@ * @method static mixed measuring(string $name, callable $callable) * @method static void dd(...$vars) * - * @see \Soyhuce\DevTools\Debug\DebugManager + * @see DebugManager */ class Debug extends Facade { diff --git a/src/Debug/DebugMiddleware.php b/src/Debug/DebugMiddleware.php index a578282..105676f 100644 --- a/src/Debug/DebugMiddleware.php +++ b/src/Debug/DebugMiddleware.php @@ -27,7 +27,7 @@ public function handle($request, Closure $next): mixed /** * @param \Illuminate\Http\Request $request - * @param \Illuminate\Testing\TestResponse|\Symfony\Component\HttpFoundation\Response $response + * @param \Symfony\Component\HttpFoundation\Response|TestResponse $response */ public function terminate($request, $response): void { diff --git a/src/Faker/Image.php b/src/Faker/Image.php index 0ad008c..869b01b 100644 --- a/src/Faker/Image.php +++ b/src/Faker/Image.php @@ -15,7 +15,7 @@ public static function generate( ?string $text = null, string $encoding = 'jpg', ): InterventionImage { - if (!class_exists(\Intervention\Image\Image::class)) { + if (!class_exists(InterventionImage::class)) { throw new Exception('package intervention/image is required to use Image::generate'); }