cohete/framework

Async PHP framework built on ReactPHP and RxPHP

Maintainers

Package info

github.com/pascualmg/cohete-framework

pkg:composer/cohete/framework

Statistics

Installs: 0

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-03-12 18:26 UTC

README

CI

Async PHP framework built on ReactPHP and RxPHP. ~600 LOC.

Installation

composer require cohete/framework

What's included

  • Kernel - HTTP request dispatcher with FastRoute
  • Router - JSON-based route definitions
  • ReactHttpServer - Non-blocking HTTP server on ReactPHP
  • ContainerFactory - PHP-DI container with sensible defaults
  • MessageBus - Async event bus (EventBus, CommandBus, QueryBus)
  • JsonResponse - Response factory for JSON APIs
  • Middleware - Request/Response dumpers for debugging

Quick start

$container = ContainerFactory::create([
    TodoRepository::class => fn() => new InMemoryTodoRepository(),
]);

$kernel = new Kernel($container, __DIR__ . '/routes.json');

ReactHttpServer::init(
    host: '0.0.0.0',
    port: '8080',
    kernel: $kernel,
    loop: Loop::get(),
);

See cohete/skeleton for a full working example.

License

MIT