Download the PHP package haddowg/json-api without Composer
On this page you can find all versions of the php package haddowg/json-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download haddowg/json-api
More information about haddowg/json-api
Files in haddowg/json-api
Package json-api
Short Description A modern, server-side JSON:API 1.1 library for PHP 8.3+.
License MIT
Homepage https://github.com/haddowg/json-api
Informations about the package json-api
haddowg/json-api
A modern, server-side JSON:API 1.1 library for PHP 8.3+.
Part of the jsonapi.rest suite — a complete, spec-compliant JSON:API 1.1 stack for PHP: this framework-agnostic core, a Symfony bundle, a Laravel package, and a typed TypeScript client, bound together by one conformance-tested OpenAPI 3.1 contract.
haddowg/json-api is a typed, framework-agnostic toolkit for building
JSON:API 1.1 compliant APIs in modern PHP — serialising
resources, parsing and validating requests, negotiating content, and shaping responses
exactly as the specification requires, without tying you to any particular framework or data
layer.
The design leans on contemporary PHP: readonly value objects, enums, a typed exception hierarchy, PSR-7 v2 and PSR-15 throughout, and a fluent schema layer for declaring a resource type's attributes, relationships, filters, sorts, and validation in one place. First-class support for JSON:API profiles is built in rather than bolted on.
Requirements
- PHP 8.3, 8.4, or 8.5
Installation
Documentation
The full documentation is published at haddowg.github.io/json-api. Start with Getting started for an end-to-end walkthrough, or browse the documentation index for the reference pages.
Using a framework? The Symfony bundle and Laravel package wrap this core with idiomatic routing, validation, and a reference data layer.
Try it
The worked music-catalog example serves itself — run
docker compose up in examples/music-catalog/ and browse
the live API at http://localhost:8080/albums. It is also the single source of truth for every
documentation snippet.
Contributing
See CONTRIBUTING.md. This project uses
Conventional Commits and automated releases via
release-please.
Credits
This package began as a derivative work based on woohoolabs/yin, and substantial portions of the codebase derive from it — sincere thanks to Woohoo Labs and the yin contributors for the original library. The fluent schema layer draws inspiration from Laravel JSON:API, whose schema-first developer experience shaped this project's recommended API.
Licence
Released under the MIT Licence, with dual copyright held by Gregory Haddow and Woohoo Labs and contributors (the original woohoolabs/yin authors).
All versions of json-api with dependencies
composer-runtime-api Version ^2.0
doctrine/inflector Version ^2.0
psr/container Version ^2.0
psr/http-factory Version ^1.0
psr/http-message Version ^2.0
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.0
psr/log Version ^3.0