Skip to content

Commit 63d8c4c

Browse files
committed
Merge branch 'release/5.0.2'
2 parents e2f6696 + a0a50f0 commit 63d8c4c

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

CHANGELOG.md

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

66
## Unreleased
77

8+
## [5.0.2] - 2025-01-11
9+
10+
### Fixed
11+
12+
- [#23](https://github.com/laravel-json-api/core/pull/23) Ensure relationship meta is included in paginated relationship
13+
responses.
14+
815
## [5.0.1] - 2024-11-30
916

1017
### Fixed

src/Core/Responses/Concerns/HasRelationship.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private function allMeta(): ?Hash
4848
*
4949
* @return array|null
5050
*/
51-
private function metaForRelationship(): ?array
51+
protected function metaForRelationship(): ?array
5252
{
5353
if ($this->hasRelationMeta && $relation = $this->relation()) {
5454
return $relation->meta();

src/Core/Responses/Internal/PaginatedIdentifierResponse.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ public function __construct(JsonApiResource $resource, string $fieldName, Page $
4343
public function meta(): Hash
4444
{
4545
return Hash::cast($this->page->meta())->merge(
46+
Hash::cast(parent::metaForRelationship())
47+
)->merge(
4648
parent::meta()
4749
);
4850
}

src/Core/Responses/Internal/PaginatedRelatedResourceResponse.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ public function __construct(JsonApiResource $resource, string $fieldName, Page $
4343
public function meta(): Hash
4444
{
4545
return Hash::cast($this->page->meta())->merge(
46+
Hash::cast(parent::metaForRelationship())
47+
)->merge(
4648
parent::meta()
4749
);
4850
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy