Ecotone is the PHP architecture layer that grows with your system — without rewrites.
From #[CommandHandler] on day one, to event sourcing, sagas, outbox, and distributed messaging at scale — one package, same codebase, no forced migrations between growth stages. Declarative PHP 8 attributes on the classes you already have. No base classes, no bus wiring, no retry config.
Built on Enterprise Integration Patterns — the same pattern language behind Spring Integration, Axon, NServiceBus, and Apache Camel — brought to PHP as attribute-driven code.
class OrderService
{
#[CommandHandler]
public function placeOrder(PlaceOrder $command, EventBus $eventBus): void
{
$eventBus->publish(new OrderWasPlaced($command->orderId));
}
}
class NotificationService
{
#[Asynchronous('notifications')]
#[EventHandler]
public function whenOrderPlaced(OrderWasPlaced $event, NotificationSender $sender): void
{
$sender->sendOrderConfirmation($event->orderId);
}
}Every flow — sync, async, sagas, projections — runs through the same messaging pipeline in production and in tests. Swap the in-memory channel for RabbitMQ, Kafka, SQS, Redis, or DBAL in production; the test shape never changes.
Visit ecotone.tech to learn more.
Works with Symfony, Laravel, or any PSR-11 framework via Ecotone Lite.
The quickstart guide in the reference documentation is the fastest path to your first handler. Read more on the Ecotone Blog.
Declarative attributes mean less infrastructure code for your coding agent to read and less boilerplate for it to generate — smaller context, faster iteration, more accurate results.
- MCP Server:
https://docs.ecotone.tech/~gitbook/mcp— Install in VSCode - Agentic Skills: Ready-to-use skills that teach any coding agent to correctly write handlers, aggregates, sagas, projections, and tests
- LLMs.txt: ecotone.tech/llms.txt
- Context7: Available via @upstash/context7-mcp
Learn more: AI Integration Guide
Read Read me Development Context for information about the Monorepo. Visit Ecotone's Documentation for more information about contributing.
Use issue tracking system for new feature request and bugs. Please verify that it's not already reported by someone else.
If you want to talk or ask questions about Ecotone
If you want to help building and improving Ecotone consider becoming a sponsor:
PHP, DDD, CQRS, Event Sourcing, Sagas, Projections, Workflows, Outbox, Symfony, Laravel, Service Bus, Event Driven Architecture