Skip to content

Commit 1bd0f92

Browse files
committed
fix: add default null value for json-api property on document class
Closes #5
1 parent abb8b96 commit 1bd0f92

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

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

66
## Unreleased
77

8+
### Fixed
9+
10+
- [#5](https://github.com/laravel-json-api/encoder-neomerx/issues/5) Fix error with default value for `$jsonApi`
11+
property on the `Document` class.
12+
813
## [3.1.0] - 2023-11-08
914

1015
### Changed

src/Document.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ abstract class Document implements JsonApiDocument
4040
/**
4141
* @var JsonApi|null
4242
*/
43-
private ?JsonApi $jsonApi;
43+
private ?JsonApi $jsonApi = null;
4444

4545
/**
4646
* @var Links|null

0 commit comments

Comments
 (0)