tobyzerner / json-api-php

JSON-API (http://jsonapi.org) responses in PHP.
MIT License
436 stars 79 forks source link

Collection shouldn't have to need a serializer in case of Resource collection #132

Closed rgazelot closed 7 years ago

rgazelot commented 7 years ago

The Collection::__construct() need a SerializerInterface as second argument, but if the $data argument is an array of Resource object, this interface is never used. It should be nullable in order to fill the Collection with an array of Resource objects.

tobyzerner commented 7 years ago

This is fixed in https://github.com/tobscure/json-api/pull/119

rgazelot commented 7 years ago

@tobscure Great! I would have to have a better reading about the PRs.