Skip to content

Commit 6907524

Browse files
committed
Merge branch 'release/7.1.0'
2 parents 86260c6 + b1a850f commit 6907524

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+126
-104
lines changed

.github/workflows/tests.yml

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

2020
steps:

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file. This projec
55

66
## Unreleased
77

8+
## [7.1.0] - 2025-01-11
9+
10+
### Changed
11+
12+
- Removed PHP 8.4 deprecation notices.
13+
14+
### Fixed
15+
16+
- [#648](https://github.com/cloudcreativity/laravel-json-api/pull/648) Ensure self link is removed when it is returned
17+
as `false`.
18+
819
## [7.0.0] - 2024-03-14
920

1021
### Changed
@@ -39,7 +50,7 @@ All notable changes to this project will be documented in this file. This projec
3950

4051
- **BREAKING** Upgraded the `neomerx/json-api` dependency from `v1` to `v5` of our fork
4152
`laravel-json-api/neomerx-json-api`. Refer to the [Upgrade Guide](./docs/upgrade.md) for details of the required
42-
changes.
53+
changes.
4354

4455
## [4.1.0] - 2023-01-21
4556

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"require": {
2525
"php": "^8.2",
2626
"ext-json": "*",
27-
"laravel-json-api/neomerx-json-api": "^5.0.2",
27+
"laravel-json-api/neomerx-json-api": "^5.0.3",
2828
"laravel/framework": "^11.0",
2929
"nyholm/psr7": "^1.8",
3030
"ramsey/uuid": "^4.0",

docs/basics/schemas.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,9 @@ class Schema extends SchemaProvider
392392
{
393393
// ...
394394

395-
public function getResourceLinks($resource): ?array
395+
public function getResourceLinks($resource): iterable
396396
{
397-
return null;
397+
return ['self' => false];
398398
}
399399
}
400400
```

src/Api/Repository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function exists($apiName)
7272
* route parameters, if needed.
7373
* @return Api
7474
*/
75-
public function createApi(string $apiName, string $host = null, array $parameters = [])
75+
public function createApi(string $apiName, ?string $host = null, array $parameters = [])
7676
{
7777
$config = $this->configFor($apiName);
7878
$config = $this->normalize($config, $host);

src/Broadcasting/BroadcastsData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected function broadcastEncoder()
5151
* @param array|null $fieldsets
5252
* @return array
5353
*/
54-
protected function serializeData($data, $includePaths = null, array $fieldsets = null)
54+
protected function serializeData($data, $includePaths = null, ?array $fieldsets = null)
5555
{
5656
$params = new QueryParameters($includePaths ? (array) $includePaths : null, $fieldsets);
5757

src/Client/AbstractClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ abstract class AbstractClient implements ClientInterface
7272
abstract protected function request(
7373
$method,
7474
$uri,
75-
array $payload = null,
75+
?array $payload = null,
7676
array $parameters = []
7777
);
7878

src/Client/GuzzleClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function __construct(
6060
protected function request(
6161
$method,
6262
$uri,
63-
array $payload = null,
63+
?array $payload = null,
6464
array $parameters = []
6565
) {
6666
$request = new Request($method, $uri);

src/Codec/Encoding.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Encoding
5454
public static function create(
5555
$mediaType,
5656
int $options = 0,
57-
string $urlPrefix = null,
57+
?string $urlPrefix = null,
5858
int $depth = 512
5959
): self
6060
{
@@ -73,7 +73,7 @@ public static function create(
7373
* @param int $depth
7474
* @return Encoding
7575
*/
76-
public static function jsonApi(int $options = 0, string $urlPrefix = null, int $depth = 512): self
76+
public static function jsonApi(int $options = 0, ?string $urlPrefix = null, int $depth = 512): self
7777
{
7878
return self::create(
7979
MediaTypeInterface::JSON_API_MEDIA_TYPE,
@@ -104,7 +104,7 @@ public static function custom($mediaType): self
104104
* @param string|null $urlPrefix
105105
* @return Encoding
106106
*/
107-
public static function fromArray($key, $value, string $urlPrefix = null): self
107+
public static function fromArray($key, $value, ?string $urlPrefix = null): self
108108
{
109109
if (is_numeric($key)) {
110110
$key = $value;

src/Codec/EncodingList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class EncodingList implements IteratorAggregate, Countable
4747
* @param string|null $urlPrefix
4848
* @return EncodingList
4949
*/
50-
public static function fromArray(iterable $config, string $urlPrefix = null): self
50+
public static function fromArray(iterable $config, ?string $urlPrefix = null): self
5151
{
5252
$values = Collection::make($config)
5353
->map(fn($value, $key) => Encoding::fromArray($key, $value, $urlPrefix))

0 commit comments

Comments
 (0)