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" }, 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)