nilportugues / symfony-jsonapi

JSON API Transformer Bundle for Symfony 2 and Symfony 3
http://nilportugues.com
MIT License
115 stars 19 forks source link

setResponseMeta missing from serializedArray #31

Closed krispomphrey closed 6 years ago

krispomphrey commented 7 years ago

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.

m1n0 commented 6 years ago

This indeed is a one line fix...see https://github.com/nilportugues/php-json-api/pull/96