diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 46deb7d..eaf0932 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -14,8 +14,8 @@ jobs:
strategy:
fail-fast: true
matrix:
- php: [8.2, 8.3]
- laravel: [11]
+ php: [8.2, 8.3, 8.4]
+ core: ['4.3.2', '5.0.1']
steps:
- name: Checkout Code
@@ -30,8 +30,8 @@ jobs:
coverage: none
ini-values: error_reporting=E_ALL
- - name: Set Laravel Version
- run: composer require "illuminate/contracts:^${{ matrix.laravel }}" --no-update
+ - name: Set Laravel JSON:API Core Version
+ run: composer require "laravel-json-api/core:^${{ matrix.core }}" --no-update
- name: Install dependencies
uses: nick-fields/retry@v3
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f8a63f9..93dd209 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. This projec
## Unreleased
+## [3.1.0] - 2024-11-30
+
+### Added
+
+- Allow `laravel-json-api/core` v4 and v5.
+
+### Fixed
+
+- Remove deprecation notices for PHP 8.4.
+
## [3.0.0] - 2024-03-12
### Changed
diff --git a/composer.json b/composer.json
index 3160f4b..bee80fd 100644
--- a/composer.json
+++ b/composer.json
@@ -27,8 +27,8 @@
"ext-json": "*",
"illuminate/contracts": "^11.0",
"illuminate/pipeline": "^11.0",
- "laravel-json-api/core": "^4.0",
- "laravel-json-api/validation": "^4.0"
+ "laravel-json-api/core": "^4.3.2|^5.0.1",
+ "laravel-json-api/validation": "^4.2"
},
"require-dev": {
"laravel-json-api/testing": "^3.0",
@@ -50,7 +50,7 @@
"dev-develop": "3.x-dev"
}
},
- "minimum-stability": "dev",
+ "minimum-stability": "stable",
"prefer-stable": true,
"config": {
"sort-packages": true
diff --git a/phpunit.xml b/phpunit.xml
index c2d37a1..215e292 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -13,6 +13,7 @@
failOnWarning="true"
failOnDeprecation="true"
failOnNotice="true"
+ displayDetailsOnTestsThatTriggerDeprecations="true"
>
diff --git a/src/Pipes/ValidationExceptionHandler.php b/src/Pipes/ValidationExceptionHandler.php
index 2dc5355..90c3cea 100644
--- a/src/Pipes/ValidationExceptionHandler.php
+++ b/src/Pipes/ValidationExceptionHandler.php
@@ -36,7 +36,7 @@ class ValidationExceptionHandler
*/
public function __construct(
private readonly Factory $factory,
- Translator $translator = null,
+ ?Translator $translator = null,
) {
$this->translator = $translator;
}
diff --git a/tests/Integration/ExceptionsTest.php b/tests/Integration/ExceptionsTest.php
index e11e062..38b1050 100644
--- a/tests/Integration/ExceptionsTest.php
+++ b/tests/Integration/ExceptionsTest.php
@@ -364,7 +364,7 @@ public function testRequestException(): void
$expected = [
'errors' => [
[
- 'detail' => 'Your request is badly formatted.',
+ 'detail' => 'Bad request.',
'status' => '400',
'title' => 'Bad Request',
],
@@ -387,6 +387,7 @@ public function testRequestExceptionWithoutMessage(): void
$expected = [
'errors' => [
[
+ 'detail' => 'Bad request.',
'status' => '400',
'title' => 'Bad Request',
],