From 2a035e79b5b281189bdc8972c96c044e19a75d04 Mon Sep 17 00:00:00 2001 From: Benedikt Franke Date: Sun, 29 Mar 2026 20:17:14 +0200 Subject: [PATCH 1/2] Add Laravel 13 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes https://github.com/nuwave/lighthouse/issues/2761 Switch CI from illuminate/contracts to laravel/framework to avoid the standalone package conflict introduced in Laravel 13. 🤖 Generated with Claude Code --- .github/workflows/validate.yml | 28 ++++++++++++++++++++-------- CHANGELOG.md | 4 ++++ composer.json | 22 +++++++++++----------- 3 files changed, 35 insertions(+), 19 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index cd2932966..6a53b5687 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -28,11 +28,13 @@ jobs: - "8.2" - "8.3" - "8.4" + - "8.5" laravel-version: - "^9" - "^10" - "^11" - "^12" + - "^13" composer: - name: lowest arg: "--prefer-lowest --prefer-stable" @@ -49,6 +51,10 @@ jobs: laravel-version: "^12" - php-version: "8.1" laravel-version: "^12" + - php-version: "8.0" + laravel-version: "^13" + - php-version: "8.1" + laravel-version: "^13" steps: - uses: actions/checkout@v4 @@ -74,7 +80,7 @@ jobs: - run: > composer require - illuminate/contracts:${{ matrix.laravel-version }} + laravel/framework:${{ matrix.laravel-version }} --no-interaction --prefer-dist --no-progress @@ -96,11 +102,13 @@ jobs: - "8.2" - "8.3" - "8.4" + - "8.5" laravel-version: - "^9" - "^10" - "^11" - "^12" + - "^13" os: - ubuntu-latest composer: @@ -119,6 +127,10 @@ jobs: laravel-version: "^12" - php-version: "8.1" laravel-version: "^12" + - php-version: "8.0" + laravel-version: "^13" + - php-version: "8.1" + laravel-version: "^13" services: mysql: @@ -160,7 +172,7 @@ jobs: - run: > composer require - illuminate/contracts:${{ matrix.laravel-version }} + laravel/framework:${{ matrix.laravel-version }} --no-interaction --prefer-dist --no-progress @@ -174,8 +186,8 @@ jobs: strategy: matrix: - php-version: ["8.4"] - laravel-version: ["^12"] + php-version: ["8.5"] + laravel-version: ["^13"] services: mysql: @@ -210,7 +222,7 @@ jobs: - run: composer remove --dev phpbench/phpbench rector/rector --no-update - - run: composer require illuminate/contracts:${{ matrix.laravel-version }} --no-interaction --prefer-dist --no-progress + - run: composer require laravel/framework:${{ matrix.laravel-version }} --no-interaction --prefer-dist --no-progress - run: vendor/bin/phpunit --coverage-clover=coverage.xml @@ -222,8 +234,8 @@ jobs: strategy: matrix: - php-version: ["8.4"] - laravel-version: ["^12"] + php-version: ["8.5"] + laravel-version: ["^13"] steps: - uses: actions/checkout@v4 @@ -240,6 +252,6 @@ jobs: path: ~/.composer/cache key: php-${{ matrix.php-version }}-composer-${{ matrix.laravel-version }} - - run: composer require illuminate/contracts:${{ matrix.laravel-version }} --no-interaction --prefer-dist --no-progress + - run: composer require laravel/framework:${{ matrix.laravel-version }} --no-interaction --prefer-dist --no-progress - run: vendor/bin/phpbench run --progress=none --report=aggregate diff --git a/CHANGELOG.md b/CHANGELOG.md index 43ecd7683..843061104 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ You can find and compare releases at the [GitHub release page](https://github.co ## Unreleased +### Added + +- Support Laravel 13 + ## v6.65.0 ### Added diff --git a/composer.json b/composer.json index 0a4e8e374..1945e50a3 100644 --- a/composer.json +++ b/composer.json @@ -29,15 +29,15 @@ "php": "^8", "ext-json": "*", "haydenpierce/class-finder": "^0.4 || ^0.5", - "illuminate/auth": "^9 || ^10 || ^11 || ^12", - "illuminate/bus": "^9 || ^10 || ^11 || ^12", - "illuminate/contracts": "^9 || ^10 || ^11 || ^12", - "illuminate/http": "^9 || ^10 || ^11 || ^12", - "illuminate/pagination": "^9 || ^10 || ^11 || ^12", - "illuminate/queue": "^9 || ^10 || ^11 || ^12", - "illuminate/routing": "^9 || ^10 || ^11 || ^12", - "illuminate/support": "^9 || ^10 || ^11 || ^12", - "illuminate/validation": "^9 || ^10 || ^11 || ^12", + "illuminate/auth": "^9 || ^10 || ^11 || ^12 || ^13", + "illuminate/bus": "^9 || ^10 || ^11 || ^12 || ^13", + "illuminate/contracts": "^9 || ^10 || ^11 || ^12 || ^13", + "illuminate/http": "^9 || ^10 || ^11 || ^12 || ^13", + "illuminate/pagination": "^9 || ^10 || ^11 || ^12 || ^13", + "illuminate/queue": "^9 || ^10 || ^11 || ^12 || ^13", + "illuminate/routing": "^9 || ^10 || ^11 || ^12 || ^13", + "illuminate/support": "^9 || ^10 || ^11 || ^12 || ^13", + "illuminate/validation": "^9 || ^10 || ^11 || ^12 || ^13", "laragraph/utils": "^1.5 || ^2", "thecodingmachine/safe": "^1 || ^2 || ^3", "webonyx/graphql-php": "^15" @@ -49,7 +49,7 @@ "fakerphp/faker": "^1.21", "google/protobuf": "^3.21 || ^4.33.6", "larastan/larastan": "^2.9.14 || ^3.0.4", - "laravel/framework": "^9 || ^10 || ^11 || ^12", + "laravel/framework": "^9 || ^10 || ^11 || ^12 || ^13", "laravel/legacy-factories": "^1.1.1", "laravel/pennant": "^1", "laravel/scout": "^8 || ^9 || ^10", @@ -58,7 +58,7 @@ "mll-lab/php-cs-fixer-config": "^5", "mockery/mockery": "^1.5", "nesbot/carbon": "^2.62.1 || ^3.8.4", - "orchestra/testbench": "^7.50 || ^8.32 || ^9.10 || ^10.1", + "orchestra/testbench": "^7.50 || ^8.32 || ^9.10 || ^10.1 || ^11", "phpbench/phpbench": "^1.2.6", "phpstan/extension-installer": "^1", "phpstan/phpstan": "^1.12.18 || ^2", From 04893775dfb827b0a3827385dc298c3060479796 Mon Sep 17 00:00:00 2001 From: Benedikt Franke Date: Sun, 29 Mar 2026 20:28:36 +0200 Subject: [PATCH 2/2] Fix Laravel 13 compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Exclude PHP 8.2 from Laravel 13 matrix (L13 requires PHP 8.3+). Remove static from closure passed to AuthManager::extend() — Laravel 13 binds $this to it, which errors on static closures. 🤖 Generated with Claude Code --- .github/workflows/validate.yml | 4 ++++ src/Subscriptions/SubscriptionServiceProvider.php | 2 +- .../Iterators/AuthenticatingSyncIteratorTest.php | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 6a53b5687..b37efd3a7 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -55,6 +55,8 @@ jobs: laravel-version: "^13" - php-version: "8.1" laravel-version: "^13" + - php-version: "8.2" + laravel-version: "^13" steps: - uses: actions/checkout@v4 @@ -131,6 +133,8 @@ jobs: laravel-version: "^13" - php-version: "8.1" laravel-version: "^13" + - php-version: "8.2" + laravel-version: "^13" services: mysql: diff --git a/src/Subscriptions/SubscriptionServiceProvider.php b/src/Subscriptions/SubscriptionServiceProvider.php index 44cb89d62..4cd81932f 100644 --- a/src/Subscriptions/SubscriptionServiceProvider.php +++ b/src/Subscriptions/SubscriptionServiceProvider.php @@ -63,7 +63,7 @@ public function boot(EventsDispatcher $dispatcher, ConfigRepository $configRepos $this->app->bind(SubscriptionIterator::class, AuthenticatingSyncIterator::class); $this->app->make(AuthManager::class) - ->extend(SubscriptionGuard::GUARD_NAME, static fn (): SubscriptionGuard => new SubscriptionGuard()); + ->extend(SubscriptionGuard::GUARD_NAME, fn (): SubscriptionGuard => new SubscriptionGuard()); } } diff --git a/tests/Unit/Subscriptions/Iterators/AuthenticatingSyncIteratorTest.php b/tests/Unit/Subscriptions/Iterators/AuthenticatingSyncIteratorTest.php index f05a3a4e4..400b831b3 100644 --- a/tests/Unit/Subscriptions/Iterators/AuthenticatingSyncIteratorTest.php +++ b/tests/Unit/Subscriptions/Iterators/AuthenticatingSyncIteratorTest.php @@ -56,7 +56,7 @@ public function testSetsAndResetsGuardContextAfterEachIteration(): void $authManager = $this->app->make(AuthManager::class); - $authManager->extend(SubscriptionGuard::GUARD_NAME, static fn (): SubscriptionGuard => $guard); + $authManager->extend(SubscriptionGuard::GUARD_NAME, fn (): SubscriptionGuard => $guard); $processedItems = []; $authenticatedUsers = [];