Skip to content
thesis-phpPublic

About

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

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Thesis

Check PHP License

An ecosystem of asynchronous PHP on an event loop of its own, on Io\Poll of PHP 8.6: structured concurrency for fibers, non-blocking I/O, TCP, TLS and DNS, an AMQP client and the tools around them. Unix only, the packages with I/O and time in int nanoseconds require 64-bit PHP.

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 Release Description
thesis/amqp Release AMQP 0.9.1 client for RabbitMQ: publisher confirms, consumers as iterators, reconnects.
thesis/async Release Structured concurrency for PHP fibers on an event loop of its own: cancellation is a property of the task tree.
thesis/async-trace Release 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, waits that last too long.
thesis/cache Release Cache interface with Time\Duration TTLs, a local LRU cache and stampede protection by a keyed mutex.
thesis/dispatcher Release Synchronous event dispatcher: a listener gets the events of the type of its parameter, resolved once per class.
thesis/exceptionally Release Turns PHP errors into exceptions around a callable, safe when the callable suspends a fiber.
thesis/formatter Release Formats PHP values, classes, functions and parameters into short strings for error messages.
thesis/io Release Fast binary I/O: byte buffer with typed encoding, non-blocking streams and stdio.
thesis/net Release Non-blocking TCP and Unix sockets with TLS and an async DNS resolver, cancelled by the task tree.
thesis/phpstan-extension Release PHPStan extension for thesis packages: precise types where PHPDoc generics cannot express them.
thesis/source-location Release Where in the source code: a file and a line, the caller outside a library, the code of eval() resolved.
thesis/testo-plugin Release Testo plugins for thesis packages: tests in the event loop of thesis/async, real or virtual time, PHP errors as failures.
thesis/time Release Time\Duration polyfill for PHP >=8.2, shorthands like sec(5) and toMs(), 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 an event loop of its own: structured concurrency for fibers, non-blocking I/O, TCP/TLS/DNS, AMQP. Monorepo of the thesis/* packages.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages