-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
Typed property LaravelJsonApi\Encoder\Neomerx\Document::$jsonApi must not be accessed before initialization
The class code explicitly declares the variable as null, but does not set a default value like the closest fields.
/**
* @var JsonApi|null
*/
private ?JsonApi $jsonApi;
/**
* @var Links|null
*/
private ?Links $links = null;
/**
* @var Hash|null
*/
private ?Hash $meta = null;
I get this error when I try to disable in my responses top-level JSON:API member (jsonapi filed).
The class Document.php also implements the method withoutJsonApi()
. Using which you could disable this field, but not used anywhere
Metadata
Metadata
Assignees
Labels
No labels