hi / kafka-driver
PHP-level coroutine drivers + stubs for hi-kafka-ext (Swoole + Swow)
v0.0.13
2026-08-05 07:09 UTC
Requires
- php: >=8.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.95
- phpunit/phpunit: ^11.5
Suggests
- ext-hi-kafka: Real runtime implementation; without it, Client falls back to no-op stubs (IDE / CI only)
- ext-swoole: Required for Hi\Kafka\SwooleClient
- ext-swow: Required for Hi\Kafka\SwowClient
README
The authoritative system design is ../ARCHITECTURE.md. This file is only a source-review and test entry point.
Source map
Client,SwooleClient,SwowClient: public runtime entry points.CoroutineConsumerStream: runtime-neutral ordering of consumer IO, barriers and recovery.ConsumerTransportInterface: the narrow Swoole/Swow socket boundary.Internal/ConsumerStreamState: pure subscription identity, credit and settlement invariants.Internal/ConsumerFrameReader: connection-local incremental frame buffering.Internal/ConsumerProtocolInterface: replaceable boundary around extension codecs.
The Internal classes are public only because Composer must autoload them. They are not package API and may change without compatibility guarantees.
Tests
composer test
The unit suite uses fake protocol, worker and transport implementations. It must run without the hi-kafka, Swoole or Swow extensions and without a Kafka broker. Real runtime coverage remains in ../tests/php.