Skip to content

Async Plan

Piotr Hałas edited this page Oct 3, 2026 · 1 revision

Async plan

The async branch is an experiment: can Symfony, Slim and Laravel run with minimal php-src patches, with synchronous application code and requests switched as fibers at wait points? It is synced from main from time to time. Full evidence: Async Analysis 2026-10-03.

State (2026-10-03)

  • 13 commits ahead of main, 27 behind; 7 conflicting files; the sync workflow has never run.
  • Needs only two php-src patches (0007 TLS, 0008 stream_select); the io_hooks RFC could replace both.
  • The core design (state swap, executor, I/O seam) is sound. The failure lifecycle (fatal error, SIGQUIT, dropped requests) is not safe.
  • Framework results in docs/frameworks.md are stale and need app help; no CI runs them.

Decisions (Piotr, 2026-10-03)

  1. Delete the dead True Async executor (#530, #623).
  2. Include model: option A, a validated fiber.shared_includes directive, default on (#78).
  3. Refuse all persistent connections under the fiber executor (#550).
  4. Refuse the session files handler under fiber with pm > 1 (#616).
  5. After a fatal error, drain and recycle the child (#607).

Open: whether main keeps its empty async seams (#601).

Phases

Order: make the branch maintainable, then failures safe, then correctness, then measure frameworks again. No new fiber features before phase 3 is done.

Phase Goal Issues
1 Branch infrastructure: async-only patch dir and CI, exclude fiber sources from main's SDK build, manual main→async merge, working sync #620, #528
2 Delete dead code and stale text #623, #624, #530
3 Lifecycle safety: bailout, SIGQUIT, dropped request, time limit and recycling, shutdown functions, in-flight cap #607, #608, #609, #610, #82, #529
4 Isolation and I/O correctness: FastCGI read, TLS connect/read, flock, session arbiter, files handler, error fields, statics, tests #611-#618, #622, #79, #84, #85, #80, #549, #550, #551
5 Framework re-validation in CI, OPcache, Redis misattribution #619, #621, #449, #83, #50, #52
6 io_hooks migration when the RFC lands (PHP 8.7) #599, #600, #81

Clone this wiki locally