Download the PHP package haddowg/json-api-symfony without Composer
On this page you can find all versions of the php package haddowg/json-api-symfony. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download haddowg/json-api-symfony
More information about haddowg/json-api-symfony
Files in haddowg/json-api-symfony
Package json-api-symfony
Short Description Symfony bundle for haddowg/json-api: idiomatic routing, content negotiation, validation, and a Doctrine data layer for spec-compliant JSON:API 1.1 endpoints.
License MIT
Homepage https://github.com/haddowg/json-api-symfony
Informations about the package json-api-symfony
haddowg/json-api-symfony
Part of the jsonapi.rest suite — a complete, spec-compliant JSON:API 1.1 stack for PHP: a framework-agnostic core, this Symfony bundle, a Laravel package, and a typed TypeScript client, bound together by one conformance-tested OpenAPI 3.1 contract.
A Symfony bundle that makes
haddowg/json-api idiomatic in a Symfony application:
register a JSON:API type as a service and get the standard
JSON:API 1.1 endpoint set — idiomatic routing, content
negotiation, spec-compliant error documents, constraint validation, and a reference Doctrine
data layer — with no controller, no operation handler, and no serializer wired by hand.
It is the Symfony twin of the Laravel package: both build on the same framework-agnostic core and project a byte-identical OpenAPI document for an identical domain, so a client generator consumes either backend unchanged.
Requirements
- PHP 8.3, 8.4, or 8.5
- Symfony 6.4, 7.x, or 8.x
Doctrine, the validator, the opis linter, and strict email are opt-in (suggest
dependencies) — install one to enable that capability, leave it out and the path is simply
absent. See the optional-dependency matrix.
Installation
Composer pulls the core library and the PSR-7 bridge it needs. Registering the bundle and importing its routes — the one step that surprises everyone, since the bundle mounts no routes until you ask it to — is covered in install.
Documentation
Full documentation is published at haddowg.github.io/json-api-symfony. Start with install and getting started, or browse the documentation index.
Core concepts (fields, relations, constraints, response value objects) live in the core documentation.
Demo
docker compose up from examples/music-catalog-symfony boots
the full music-catalog service — curl http://localhost:8080/albums, with interactive OpenAPI
docs (Swagger UI) at http://localhost:8080/docs. The
getting-started guide walks the
same example.
Licence
Released under the MIT Licence.
All versions of json-api-symfony with dependencies
haddowg/json-api Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^2.0
symfony/config Version ^6.4 || ^7.0 || ^8.0
symfony/console Version ^6.4 || ^7.0 || ^8.0
symfony/dependency-injection Version ^6.4 || ^7.0 || ^8.0
symfony/event-dispatcher Version ^6.4 || ^7.0 || ^8.0
symfony/http-foundation Version ^6.4 || ^7.0 || ^8.0
symfony/http-kernel Version ^6.4 || ^7.0 || ^8.0
symfony/psr-http-message-bridge Version ^6.4 || ^7.0 || ^8.0
symfony/routing Version ^6.4 || ^7.0 || ^8.0
symfony/string Version ^6.4 || ^7.0 || ^8.0
nyholm/psr7 Version ^1.8