A PHP implementation of the JSON:API specification for Doctrine ORM.
- Full JSON:API 1.0 specification compliance
- Doctrine ORM integration
- Flexible filtering system with custom filter support
- Sorting, pagination, and sparse fieldsets
- Relationship handling (to-one and to-many)
- Content negotiation
- Validation support via Symfony Validator
- PSR-7 HTTP message interfaces
composer require modufolio/json-api- PHP 8.2 or higher
- Doctrine ORM 3.0+
- PSR-7 HTTP Message implementation
- PSR-17 HTTP Factory implementation
Tested against SQLite, MySQL 8.4, PostgreSQL 16 and SQL Server 2022.
The suite runs on SQLite in memory by default, so a fresh checkout needs no setup:
composer testThe engines disagree in ways that change which rows a query returns — where
NULLs sort, whether LIKE folds case, whether a partially-grouped SELECT is
even legal — so the same suite runs against each of them. docker compose up -d
brings the databases up locally:
DB_DRIVER=pdo_pgsql DB_PORT=5433 DB_USER=postgres DB_PASSWORD=secret vendor/bin/phpunit
DB_DRIVER=pdo_mysql DB_PORT=3307 DB_USER=root DB_PASSWORD=secret vendor/bin/phpunit
DB_DRIVER=pdo_sqlsrv DB_PORT=1434 DB_USER=sa DB_PASSWORD='Secret_1234' vendor/bin/phpunitCI runs the full matrix on every push.
MIT