json-api-php icon indicating copy to clipboard operation
json-api-php copied to clipboard

JSON-API (http://jsonapi.org) responses in PHP.

Results 11 json-api-php issues
Sort by recently updated
recently updated
newest added

Wondering if this is still an active project. I am considering using it and would be happy to contribute with pull requests. Thanks

Currently method getLimit() returns string, which is different from PHPDoc. It could affect PHP apps which used declare(strict_types=1);

Simpler, 2-3x faster, and doesn't violate the LSP like the old serializer-based API (#115). Still to come: * [x] Rewrite tests * [x] Redo error handling * [x] Finalize meta/links...

*tobscure/json-api* is very a non-specific name, it doesn't really tell you what the library *does*. In #121 I've said I want to keep the scope of this library quite narrow...

Implements #139 ### Problem Sometimes resources require to have polymorphic relations. `Garage` has many `vehicles` in it. Vehicle could has it's own type `Car` or `Bike`. `Garage` has one `owner`....

Hello, guys! I'm thinking about possibility to add Polymorphic Serializers in my application. ## Preface Imagine situation when you have `activity` resource with `actor` relationship which polymorphic and could be...

The members data and errors MUST NOT coexist in the same document. see [http://jsonapi.org/format/#document-top-level](http://jsonapi.org/format/#document-top-level) I quickly solved it this way as any exception gets turned in to an error in...

I think that the method [Document::setData($element)](https://github.com/tobscure/json-api/blob/master/src/Document.php#L139) should accept a nullable value as the constructor does.

Fractal allows to use [Cursors for pagination](https://fractal.thephpleague.com/pagination/#using-cursors). It will be great to have them in this package too. They are extremely useful for streaming data.

Unless the pagination links are removed from the URI passed to `Document::addPaginationLinks()` the output will be duplicated: ```json "links": { "first": "https:\/\/api.acme.net\/users?page%5Blimit%5D=5?page%5Blimit%5D=5", "next": "https:\/\/api.acme.net/users?page%5Blimit%5D=5?page%5Blimit%5D=5&page%5Boffset%5D=5" } ``` It should be clearly...