Skip to content

v0.2.0

Choose a tag to compare

@rasuvaeff rasuvaeff released this 11 Oct 09:21
· 5 commits to master since this release
8d825ec
  • Context::onTerminate() returns an unsubscribe closure
    (\Closure(): void) instead of void; calling it removes the listener,
    and it is a no-op once the listener ran. Source-compatible: callers that
    ignore the return value are unaffected (#1).
  • A terminated context state detaches from its parent and releases its
    listeners and children, so a long-lived parent no longer accumulates every
    cancelled or expired child it derived. withValue() now shares its
    parent's state instead of attaching a new child per call (#1).
  • withTimeout() no longer overflows: a timeout beyond the representable
    range saturates at a PHP_INT_MAX deadline, and a zero or negative timeout
    yields an immediate deadline (the context is expired on first
    observation) (#2).
  • ContextExpiredException accepts an optional $previous throwable, so a
    transport adapter can keep the underlying timeout as the cause.
  • Documented propagating a budget across a process boundary: send
    remainingMs(), rebuild with withTimeout($ms / 1000) on the receiving
    side (#4).
  • README/llms.txt placeholders replaced with the real API reference, Russian
    README added, property tests for subtree cancellation and nearest-ancestor
    value lookup, regression-corpus caching in CI (#3).