♞♘ Just another JSON API kit.
composer require joust/joustEarly stage of development, everything is in flux!
- Routes: define routes, route lists, and access matched path parameters.
- Route discovery and caching: register handler routes with
AsRouteand cache discovered routes. - PSR-15 routing: use Joust as middleware or a terminal request handler.
- JSON responses: create JSON and problem responses and configure defaults.
Run the todo API demo with PHP's built-in server:
composer install
composer demoOpen http://localhost:8081 to try the API from the clickable home page. Todo data persists between requests in a JSON file in the system temporary directory.
The API includes GET /todos, GET /todos/:id, POST /todos, and PATCH /todos/:id/complete. The home page also
demonstrates validation, not-found responses, malformed JSON, unrouted requests, and Errata's exception handling.
This project uses Mago for lint, formatting, and static analysis.
composer run fix # automatically fix lint, analysis, and formatting issues
composer run format # format source code
composer run check # check style
composer run lint # lint code
composer run analyze # static analysis
composer run test # unit testing with 100% coverage enforced
composer run verify # run all verifications (check + lint + analyze + test)