Closed krispomphrey closed 6 years ago
In the JsonApiTransformer class when objects are being serialized there are three calls to build the response body...
JsonApiTransformer
function serialization(...)
$this->setResponseLinks($value, $data); $this->setResponseMeta($data); $this->setResponseVersion($data);
$this->setResponseLinks($value, $data);
$this->setResponseMeta($data);
$this->setResponseVersion($data);
But that is missing inside the function serializedArray.
serializedArray
function serializedArray(...)
$this->setResponseLinks($value, $data); $this->setResponseVersion($data);
This is causing meta properties to be missed from serialized arrays. The setResponseMeta method should be called inside serializedArray.
setResponseMeta
This indeed is a one line fix...see https://github.com/nilportugues/php-json-api/pull/96
In the
JsonApiTransformer
class when objects are being serialized there are three calls to build the response body...function serialization(...)
$this->setResponseLinks($value, $data);
$this->setResponseMeta($data);
$this->setResponseVersion($data);
But that is missing inside the function
serializedArray
.function serializedArray(...)
$this->setResponseLinks($value, $data);
$this->setResponseVersion($data);
This is causing meta properties to be missed from serialized arrays. The
setResponseMeta
method should be called inside serializedArray.