Bootstrap PHP HTTP service with front controller and /v1 router #4

Closed
opened 2026-07-01 00:57:28 +00:00 by manlycucumber · 1 comment
manlycucumber commented 2026-07-01 00:57:28 +00:00 (Migrated from github.com)

Problem

The Api repo needs a running PHP HTTP service before any endpoint can exist. There must be a single front controller, a versioned /v1 route prefix, and a way to map paths to handlers without pulling in heavy framework dependencies that would complicate the cache-first design.

Acceptance criteria

  • A front controller dispatches all requests through one entry point and mounts routes under the /v1 prefix.
  • Unknown paths under /v1 return a 404 JSON error; paths outside /v1 return a clear versioning error.
  • A trivial health/ping route under /v1 returns 200 with a JSON body.
  • Routing is covered by tests for matched, unmatched, and wrong-method cases.

Notes

Clean-room implementation; do not port routing from any prior project. PHP runtime only.

## Problem The Api repo needs a running PHP HTTP service before any endpoint can exist. There must be a single front controller, a versioned `/v1` route prefix, and a way to map paths to handlers without pulling in heavy framework dependencies that would complicate the cache-first design. ## Acceptance criteria - [ ] A front controller dispatches all requests through one entry point and mounts routes under the `/v1` prefix. - [ ] Unknown paths under `/v1` return a 404 JSON error; paths outside `/v1` return a clear versioning error. - [ ] A trivial health/ping route under `/v1` returns 200 with a JSON body. - [ ] Routing is covered by tests for matched, unmatched, and wrong-method cases. ## Notes Clean-room implementation; do not port routing from any prior project. PHP runtime only.
manlycucumber commented 2026-07-03 05:31:29 +00:00 (Migrated from github.com)

Delivered in #133 (squash-merged to develop).

Delivered in #133 (squash-merged to `develop`).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Directorium/Api#4
No description provided.