From e48ad70fe796e4888259e52f965d97130afbeecc Mon Sep 17 00:00:00 2001 From: iman Date: Sun, 6 Sep 2026 09:54:36 +0330 Subject: [PATCH 1/2] feat: support Laravel 13 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Widen the illuminate/* constraints to ^13.0 and add a Laravel 13 row to the CI matrix (testbench ^11.0, PHP 8.3/8.4 — Laravel 13 requires PHP ^8.3, so the 8.2 combination is excluded). No src/ changes were needed: every Illuminate API the package touches (Support\Manager's container/customCreators/createDriver, PendingRequest's retry/send/timeout, Client\Response, ServiceProvider's publishes and mergeConfigFrom) is unchanged in 13.x. Dev dependencies widened alongside: testbench ^11.0, pest ^4.0 and pest-plugin-laravel ^4.0. Laravel 11 and 12 remain supported. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/tests.yml | 10 ++++++++-- CHANGELOG.md | 2 ++ README.md | 4 ++-- composer.json | 12 ++++++------ 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b958aa0..2b690c8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,12 +21,18 @@ jobs: fail-fast: false matrix: php: ['8.2', '8.3', '8.4'] - laravel: ['11.*', '12.*'] + laravel: ['11.*', '12.*', '13.*'] + exclude: + # Laravel 13 requires PHP 8.3+. + - php: '8.2' + laravel: '13.*' include: - laravel: '11.*' testbench: '9.*' - laravel: '12.*' testbench: '10.*' + - laravel: '13.*' + testbench: '11.*' name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} @@ -73,7 +79,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.3' + php-version: '8.4' extensions: mbstring, json coverage: none diff --git a/CHANGELOG.md b/CHANGELOG.md index 36da600..2c831ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,3 +20,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 listener writing to a configurable log channel. - `AbstractAdapterRequest` / `AbstractAdapterResponse` base DTOs and the `ExtractsTolerantFields` trait for casing-tolerant parsing of inconsistent third-party APIs. +- Laravel 13 support (`illuminate/*` `^13.0`), tested in CI on PHP 8.3 and 8.4 against + `orchestra/testbench` `^11.0`. Laravel 11 and 12 remain supported. diff --git a/README.md b/README.md index 5b50642..abe2c1c 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,8 @@ package extracts that into a single abstraction: ## Requirements -- PHP 8.2+ -- Laravel 11 or 12 +- PHP 8.2+ (PHP 8.3+ for Laravel 13) +- Laravel 11, 12, or 13 ## Installation diff --git a/composer.json b/composer.json index 1a44cba..7fb9226 100644 --- a/composer.json +++ b/composer.json @@ -17,14 +17,14 @@ ], "require": { "php": "^8.2", - "illuminate/support": "^11.0|^12.0", - "illuminate/http": "^11.0|^12.0", - "illuminate/contracts": "^11.0|^12.0" + "illuminate/support": "^11.0|^12.0|^13.0", + "illuminate/http": "^11.0|^12.0|^13.0", + "illuminate/contracts": "^11.0|^12.0|^13.0" }, "require-dev": { - "orchestra/testbench": "^9.0|^10.0", - "pestphp/pest": "^2.0|^3.0", - "pestphp/pest-plugin-laravel": "^2.0|^3.0", + "orchestra/testbench": "^9.0|^10.0|^11.0", + "pestphp/pest": "^2.0|^3.0|^4.0", + "pestphp/pest-plugin-laravel": "^2.0|^3.0|^4.0", "larastan/larastan": "^2.0|^3.0", "laravel/pint": "^1.0" }, From 6301463a47584f7a07de8112598a3a87e0a0e9fb Mon Sep 17 00:00:00 2001 From: iman Date: Sun, 6 Sep 2026 09:57:39 +0330 Subject: [PATCH 2/2] fix: keep AdapterManager::__call compatible with Laravel 13's Manager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Laravel 13 narrowed the `$parameters` docblock on `Illuminate\Support\Manager::__call` from `array` to `array`, which made the `array` on this override incompatible under PHPStan. Widen the override to `array` — a supertype of both — so the declaration stays valid across 11.x through 13.x. Co-Authored-By: Claude Opus 5 (1M context) --- src/AdapterManager.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/AdapterManager.php b/src/AdapterManager.php index bd54a19..6c25536 100644 --- a/src/AdapterManager.php +++ b/src/AdapterManager.php @@ -29,7 +29,11 @@ public function getDefaultDriver(): string } /** - * @param array $parameters + * The key type is left open because Laravel narrowed the parent's + * `$parameters` docblock from `array` to `array` in 13.x, + * and this override has to stay compatible across 11.x-13.x. + * + * @param array $parameters * @return AbstractApiClient */ public function __call($method, $parameters)