Skip to content
thesis-phpPublic

About

Asynchronous PHP on Revolt: structured concurrency for fibers, non-blocking I/O, TCP/TLS/DNS, AMQP. Monorepo of the thesis/* packages.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Thesis

Check PHP License

An ecosystem of asynchronous PHP built on revolt/event-loop alone: structured concurrency for fibers, non-blocking I/O, TCP, TLS and DNS, an AMQP client and the tools around them. 64-bit Unix only.

This is the development monorepo. Every package in packages/ is published as thesis/<name> from a read-only repository of its own, so issues and pull requests go here.

Packages

Package Description
thesis/amqp AMQP 0.9.1 client for RabbitMQ: publisher confirms, consumers as iterators, reconnects.
thesis/async Structured concurrency for PHP fibers: cancellation is a property of the task tree.
thesis/async-trace Tools around the trace of thesis/async: its events written as NDJSON and as lines of text for tests, who has cancelled a scope and why, code that blocks the others.
thesis/cache Cache interface with Time\Duration TTLs, a local LRU cache and stampede protection by a keyed mutex.
thesis/dispatcher Synchronous event dispatcher: a listener gets the events of the type of its parameter, resolved once per class.
thesis/exceptionally Turns PHP errors into exceptions around a callable, safe when the callable suspends a fiber.
thesis/formatter Formats PHP values, classes, functions and parameters into short strings for error messages.
thesis/io Fast binary I/O: byte buffer with typed encoding, non-blocking streams and stdio.
thesis/net Non-blocking TCP and Unix sockets with TLS and an async DNS resolver, cancelled by the task tree.
thesis/phpstan-extension PHPStan extension for thesis packages: precise types where PHPDoc generics cannot express them.
thesis/source-location Where in the source code: a file and a line, the caller outside a library, the code of eval() resolved.
thesis/testo-plugin Testo plugins for thesis packages: tests on the virtual time of thesis/async, PHP errors as failures.
thesis/time Functions for Time\Duration of PHP 8.6 and a polyfill of it for PHP 8.5, PSR-20 clocks.

Development

Everything runs in Docker, see make help.

make i                 # install dependencies
make test P=async      # test one package
make check             # everything CI runs

AGENTS.md describes the layout, the manifests and the rules of the monorepo.

About

Asynchronous PHP on Revolt: structured concurrency for fibers, non-blocking I/O, TCP/TLS/DNS, AMQP. Monorepo of the thesis/* packages.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages