Skip to content

Commit 5ffaa59

Browse files
committed
Merge branch 'develop' into next
2 parents 487944b + 7ccf7e1 commit 5ffaa59

File tree

8 files changed

+22
-15
lines changed

8 files changed

+22
-15
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: true
1616
matrix:
17-
php: [8.2, 8.3]
18-
laravel: [11]
17+
php: [8.2, 8.3, 8.4]
1918

2019
steps:
2120
- name: Checkout Code
@@ -30,9 +29,6 @@ jobs:
3029
coverage: none
3130
ini-values: error_reporting=E_ALL
3231

33-
- name: Set Laravel Version
34-
run: composer require "illuminate/contracts:^${{ matrix.laravel }}" --no-update
35-
3632
- name: Install dependencies
3733
uses: nick-fields/retry@v3
3834
with:

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. This projec
55

66
## Unreleased
77

8+
## [4.2.0] - 2024-11-30
9+
10+
### Added
11+
12+
- Package now requires `laravel-json-api/core` v4 or v5.
13+
14+
### Fixed
15+
16+
- Remove deprecation notices in PHP 8.4.
17+
818
## [4.1.1] - 2024-06-20
919

1020
### Fixed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"illuminate/contracts": "^11.0",
2929
"illuminate/http": "^11.0",
3030
"illuminate/support": "^11.0",
31-
"laravel-json-api/core": "^5.0"
31+
"laravel-json-api/core": "^6.0"
3232
},
3333
"require-dev": {
3434
"orchestra/testbench": "^9.0",

phpunit.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
failOnWarning="true"
1414
failOnDeprecation="true"
1515
failOnNotice="true"
16+
displayDetailsOnTestsThatTriggerDeprecations="true"
1617
>
1718
<coverage/>
1819
<testsuites>

src/JsonApiValidation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static function showValidatorFailures(): self
6666
* @param string|null $path
6767
* @return string
6868
*/
69-
public static function translationKeyForRule($rule, string $path = null): string
69+
public static function translationKeyForRule($rule, ?string $path = null): string
7070
{
7171
$name = Str::snake(class_basename($rule));
7272

@@ -80,7 +80,7 @@ public static function translationKeyForRule($rule, string $path = null): string
8080
* @param string|null $path
8181
* @return string
8282
*/
83-
public static function qualifyTranslationKey(string $key, string $path = null): string
83+
public static function qualifyTranslationKey(string $key, ?string $path = null): string
8484
{
8585
$namespace = self::$translationNamespace;
8686
$qualified = "{$namespace}::validation.{$key}";

src/Rule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public static function dateTime(): DateTimeIso8601
132132
* @param array|null $allowed
133133
* @return AllowedFieldSets
134134
*/
135-
public static function fieldSets(array $allowed = null): AllowedFieldSets
135+
public static function fieldSets(?array $allowed = null): AllowedFieldSets
136136
{
137137
if (is_null($allowed)) {
138138
return AllowedFieldSets::make(
@@ -233,7 +233,7 @@ public static function integer(): JsonNumber
233233
* @param string|null $name
234234
* @return ParameterNotSupported
235235
*/
236-
public static function notSupported(string $name = null): ParameterNotSupported
236+
public static function notSupported(?string $name = null): ParameterNotSupported
237237
{
238238
return new ParameterNotSupported($name);
239239
}

src/Rules/AllowedFieldSets.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function __construct(iterable $allowed = [])
6868
* the allowed fields, empty array for none allowed, or null for all allowed.
6969
* @return $this
7070
*/
71-
public function allow(string $resourceType, array $fields = null): self
71+
public function allow(string $resourceType, ?array $fields = null): self
7272
{
7373
$this->allowed[$resourceType] = $fields;
7474

src/Translator.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function __construct(TranslatorContract $translator)
4646
* rule failure details
4747
* @return Error
4848
*/
49-
public function invalid(string $pointer, string $detail = null, array $failed = []): Error
49+
public function invalid(string $pointer, ?string $detail = null, array $failed = []): Error
5050
{
5151
return Error::make()
5252
->setStatus(422)
@@ -67,7 +67,7 @@ public function invalid(string $pointer, string $detail = null, array $failed =
6767
* rule failure details
6868
* @return Error
6969
*/
70-
public function invalidResource(string $pointer, string $detail = null, array $failed = []): Error
70+
public function invalidResource(string $pointer, ?string $detail = null, array $failed = []): Error
7171
{
7272
return Error::make()
7373
->setStatus(422)
@@ -88,7 +88,7 @@ public function invalidResource(string $pointer, string $detail = null, array $f
8888
* rule failure details.
8989
* @return Error
9090
*/
91-
public function invalidQueryParameter(string $param, string $detail = null, array $failed = []): Error
91+
public function invalidQueryParameter(string $param, ?string $detail = null, array $failed = []): Error
9292
{
9393
return Error::make()
9494
->setStatus(400)
@@ -106,7 +106,7 @@ public function invalidQueryParameter(string $param, string $detail = null, arra
106106
* the validation message (already translated).
107107
* @return Error
108108
*/
109-
public function invalidDeleteRequest(string $detail = null): Error
109+
public function invalidDeleteRequest(?string $detail = null): Error
110110
{
111111
return Error::make()
112112
->setStatus(422)

0 commit comments

Comments
 (0)