Skip to content

Releases: oxphp/runtime

v0.1.0 — initial release

25 Apr 20:43

Choose a tag to compare

First public release of oxphp/runtime — a Symfony Runtime component for the OxPHP SAPI.

Dispatch

OxPHP\Runtime\Runtime picks a runner by the type of object returned from index.php:

Returned object Runner
Psr\Http\Server\RequestHandlerInterface Psr15Runner
Illuminate\Contracts\Http\Kernel LaravelRunner
Symfony\Component\HttpKernel\HttpKernelInterface HttpKernelRunner
Symfony\Component\HttpFoundation\Response HttpFoundationResponseRunner (one-shot)
Psr\Http\Message\ResponseInterface Psr7ResponseRunner (one-shot)

When the OxPHP SAPI extension is absent (PHP-FPM, built-in server, CI), the runtime gracefully falls back to SymfonyRuntime — same index.php works in dev and prod.

Highlights

  • Traditional and worker-loop modes — under oxphp_is_worker(), requests are served in a try/catch loop so a broken handler can never poison the worker.
  • Resetter chain — user resetters via the resetters runtime option; SymfonyContainerResetter is auto-prepended for full Symfony kernels so kernel.reset-tagged services are reset between requests.
  • Streaming — per-chunk oxphp_stream_flush() for iterable bodies and StreamedResponse (SSE / chunked transfer work out of the box).
  • PSR-17 autodiscovery — Nyholm → Guzzle → HttpSoft → Laminas; overridable via the psr17_factory runtime option.
  • No $_SERVER reads — request building goes through OxPHP\Http\RequestInterface, compatible with SUPERGLOBALS_ENABLED=false.

Requirements

  • PHP 8.4+
  • symfony/runtime ^7.x

Install

composer require oxphp/runtime:^0.1