Skip to content

Commit c3ec41a

Browse files
committed
Merge branch 'develop' into next
2 parents 2202200 + 4d68f45 commit c3ec41a

File tree

7 files changed

+19
-12
lines changed

7 files changed

+19
-12
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+
## [3.1.0] - 2024-11-30
9+
10+
### Added
11+
12+
- Package now requires `laravel-json-api/core` v4 or v5.
13+
14+
### Fixed
15+
16+
- Removed deprecation notices in PHP 8.4.
17+
818
## [3.0.0] - 2024-03-14
919

1020
### Changed

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/pipeline": "^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/Factory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(Specification $spec, Translator $translator)
5151
* the relation the identifier exists in.
5252
* @return Identifier
5353
*/
54-
public function createIdentifierValue(string $path, $value, Relation $relation = null): Identifier
54+
public function createIdentifierValue(string $path, $value, ?Relation $relation = null): Identifier
5555
{
5656
return new Identifier($this->spec, $this->translator, $path, $value, $relation);
5757
}

src/ResourceDocumentComplianceChecker.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,26 @@
1313

1414
use LaravelJsonApi\Contracts\Spec\ResourceDocumentComplianceChecker as ResourceDocumentComplianceCheckerContract;
1515
use LaravelJsonApi\Contracts\Support\Result as ResultContract;
16+
use LaravelJsonApi\Core\Bus\Commands\Result;
1617
use LaravelJsonApi\Core\Exceptions\JsonApiException;
17-
use LaravelJsonApi\Core\Support\Result;
1818
use LaravelJsonApi\Core\Values\ResourceId;
1919
use LaravelJsonApi\Core\Values\ResourceType;
2020

21-
class ResourceDocumentComplianceChecker implements ResourceDocumentComplianceCheckerContract
21+
final readonly class ResourceDocumentComplianceChecker implements ResourceDocumentComplianceCheckerContract
2222
{
2323
/**
2424
* ResourceDocumentComplianceChecker constructor
2525
*
2626
* @param ResourceBuilder $builder
2727
*/
28-
public function __construct(private readonly ResourceBuilder $builder)
28+
public function __construct(private ResourceBuilder $builder)
2929
{
3030
}
3131

3232
/**
3333
* @inheritDoc
3434
*/
35-
public function mustSee(ResourceType|string $type, ResourceId|string $id = null): static
35+
public function mustSee(ResourceType|string $type, ResourceId|string|null $id = null): static
3636
{
3737
$id = ($id === null) ? null : (string) $id;
3838

src/Values/Identifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function __construct(
7373
Translator $translator,
7474
string $path,
7575
$value,
76-
Relation $relation = null
76+
?Relation $relation = null
7777
) {
7878
$this->spec = $spec;
7979
$this->translator = $translator;

0 commit comments

Comments
 (0)