Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ For comprehensive guidelines, refer to [AGENTS.md](../AGENTS.md).

## Quick Reference

- Ecotone is a PHP framework for message-driven architecture (DDD, CQRS, Event Sourcing)
- Use PHP 8.1+ attributes: `#[CommandHandler]`, `#[EventHandler]`, `#[QueryHandler]`
- Test with `EcotoneLite::bootstrapForTesting()`
- Ecotone is the enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Sagas, Projections, Workflows, and Outbox messaging via PHP attributes
- Use PHP 8.1+ attributes: `#[CommandHandler]`, `#[EventHandler]`, `#[QueryHandler]`, `#[Asynchronous]`, `#[Aggregate]`, `#[Saga]`, `#[EventSourcingAggregate]`, `#[Projection]`
- Test with `EcotoneLite::bootstrapFlowTesting()`
- No comments in code - use descriptive method names instead
- Documentation: https://docs.ecotone.tech

7 changes: 4 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

## Project Overview

Ecotone is a PHP framework for message-driven architecture with DDD, CQRS, and Event Sourcing.
Works with Symfony, Laravel, or standalone (Ecotone Lite).
Ecotone is the enterprise architecture layer for Laravel and Symfony.
One Composer package adds CQRS, Event Sourcing, Sagas, Projections, Workflows, and Outbox messaging via declarative PHP 8 attributes.
Works with Symfony, Laravel, or standalone via Ecotone Lite (any PSR-11 container).

## Monorepo Structure

Expand Down Expand Up @@ -34,7 +35,7 @@ Works with Symfony, Laravel, or standalone (Ecotone Lite).

### General Approach
- Write high-level tests from end-user perspective
- Tests use **EcotoneLite** to bootstrap isolated Ecotone instances
- Tests use **`EcotoneLite::bootstrapFlowTesting`** to bootstrap isolated Ecotone instances
- Prefer **inline anonymous classes** in tests over separate fixture files
- Run tests for the specific package you modified

Expand Down
6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ For comprehensive guidelines, see [AGENTS.md](./AGENTS.md).

## Quick Reference

- Ecotone is a PHP framework for message-driven architecture (DDD, CQRS, Event Sourcing)
- Use PHP 8.1+ attributes: `#[CommandHandler]`, `#[EventHandler]`, `#[QueryHandler]`
- Test with `EcotoneLite::bootstrapForTesting()`
- Ecotone is the enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Sagas, Projections, Workflows, and Outbox messaging via PHP attributes
- Use PHP 8.1+ attributes: `#[CommandHandler]`, `#[EventHandler]`, `#[QueryHandler]`, `#[Asynchronous]`, `#[Aggregate]`, `#[Saga]`, `#[EventSourcingAggregate]`, `#[Projection]`
- Test with `EcotoneLite::bootstrapFlowTesting()`
- No comments in code - use descriptive method names instead
- Documentation: https://docs.ecotone.tech

50 changes: 35 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,48 @@
[![Total Downloads](https://img.shields.io/packagist/dt/ecotone/ecotone)](https://packagist.org/packages/ecotone/ecotone)
[![PHP Version Require](https://img.shields.io/packagist/dependency-v/ecotone/ecotone/php.svg)](https://packagist.org/packages/ecotone/ecotone)

The roots of Object Oriented Programming (OOP) were mainly about communication using Messages and logic encapsulation.
`Ecotone` aims to return to the origins of OOP, by providing tools which allows us to fully move the focus from Objects to Flows, from Data storage to Application Design, from Technicalities to Business logic.
Ecotone does that by making Messages first class-citizen in our Applications.
**Ecotone is the enterprise architecture layer for Laravel and Symfony.**

Thanks to being Message-Driven at the foundation level, Ecotone provides architecture which is resilient and scalable by default, making it possible for Developers to focus on business problems instead of technical concerns.
Together with declarative configuration and higher level building blocks, it makes the system design explicit, easy to follow and change no matter of Developers experience.
One Composer package adds CQRS, Event Sourcing, Sagas, Projections, Workflows, and Outbox messaging to your existing application — all via declarative PHP 8 attributes on the classes you already have. No base classes, no bus wiring, no retry config. The same patterns proven in Java's Spring/Axon and .NET's NServiceBus/MassTransit, brought to PHP without giving up the development speed PHP is known for.

Visit main page [ecotone.tech](https://ecotone.tech) to learn more.
```php
class OrderService
{
#[CommandHandler]
public function placeOrder(PlaceOrder $command, EventBus $eventBus): void
{
$eventBus->publish(new OrderWasPlaced($command->orderId));
}
}

> Ecotone can be used with [Symfony](https://docs.ecotone.tech/modules/symfony-ddd-cqrs-event-sourcing) and [Laravel](https://docs.ecotone.tech/modules/laravel-ddd-cqrs-event-sourcing) frameworks, or any other framework using [Ecotone Lite](https://docs.ecotone.tech/install-php-service-bus#install-ecotone-lite-no-framework).
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](https://ecotone.tech) to learn more.

> Works with [Symfony](https://docs.ecotone.tech/modules/symfony-ddd-cqrs-event-sourcing), [Laravel](https://docs.ecotone.tech/modules/laravel-ddd-cqrs-event-sourcing), or any PSR-11 framework via [Ecotone Lite](https://docs.ecotone.tech/install-php-service-bus#install-ecotone-lite-no-framework).

## Getting started

The quickstart [page](https://docs.ecotone.tech/quick-start) of the
[reference guide](https://docs.ecotone.tech) provides a starting point for using Ecotone.
Read more on the [Ecotone's Blog](https://blog.ecotone.tech).
The [quickstart guide](https://docs.ecotone.tech/quick-start) in the [reference documentation](https://docs.ecotone.tech) is the fastest path to your first handler.
Read more on the [Ecotone Blog](https://blog.ecotone.tech).

## AI-Friendly Documentation
## AI-Ready by design

Ecotone provides AI-optimized documentation for use with AI assistants and code editors:
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](vscode:mcp/install?%7B%22name%22%3A%22Ecotone%22%2C%22url%22%3A%22https%3A%2F%2Fdocs.ecotone.tech%2F~gitbook%2Fmcp%22%7D)
- **MCP Server**: `https://docs.ecotone.tech/~gitbook/mcp` — [Install in VSCode](vscode:mcp/install?%7B%22name%22%3A%22Ecotone%22%2C%22url%22%3A%22https%3A%2F%2Fdocs.ecotone.tech%2F~gitbook%2Fmcp%22%7D)
- **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](https://ecotone.tech/llms.txt)
- **Context7**: Available via [@upstash/context7-mcp](https://github.com/upstash/context7)

Expand All @@ -42,7 +62,7 @@ Visit [Ecotone's Documentation](https://docs.ecotone.tech/messaging/contributing

## Feature requests and issue reporting

Use [issue tracking system](https://github.com/ecotoneframework/ecotone/issues) for new feature request and bugs.
Use [issue tracking system](https://github.com/ecotoneframework/ecotone/issues) for new feature request and bugs.
Please verify that it's not already reported by someone else.

## Contact
Expand All @@ -62,4 +82,4 @@ If you want to help building and improving Ecotone consider becoming a sponsor:

## Tags

PHP, DDD, CQRS, Event Sourcing, Symfony, Laravel, Service Bus, Event Driven Architecture, SOA, Events, Commands
PHP, DDD, CQRS, Event Sourcing, Sagas, Projections, Workflows, Outbox, Symfony, Laravel, Service Bus, Event Driven Architecture
37 changes: 17 additions & 20 deletions _PackageTemplate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,33 @@ To contribute make use of [Ecotone-Dev repository](https://github.com/ecotonefra
[![Total Downloads](https://img.shields.io/packagist/dt/ecotone/ecotone)](https://packagist.org/packages/ecotone/ecotone)
[![PHP Version Require](https://img.shields.io/packagist/dependency-v/ecotone/ecotone/php.svg)](https://packagist.org/packages/ecotone/ecotone)

The roots of Object Oriented Programming (OOP) were mainly about communication using Messages and logic encapsulation.
`Ecotone` aims to return to the origins of OOP, by providing tools which allows us to fully move the focus from Objects to Flows, from Data storage to Application Design, from Technicalities to Business logic.
Ecotone does that by making Messages first class-citizen in our Applications.
**Ecotone is the enterprise architecture layer for Laravel and Symfony.**

Thanks to being Message-Driven at the foundation level, Ecotone provides architecture which is resilient and scalable by default, making it possible for Developers to focus on business problems instead of technical concerns.
Together with declarative configuration and higher level building blocks, it makes the system design explicit, easy to follow and change no matter of Developers experience.
One Composer package adds CQRS, Event Sourcing, Sagas, Projections, Workflows, and Outbox messaging to your existing application — all via declarative PHP 8 attributes on the classes you already have.

Visit main page [ecotone.tech](https://ecotone.tech) to learn more.
## {{Package name}}

> Ecotone can be used with [Symfony](https://docs.ecotone.tech/modules/symfony-ddd-cqrs-event-sourcing) and [Laravel](https://docs.ecotone.tech/modules/laravel-ddd-cqrs-event-sourcing) frameworks, or any other framework using [Ecotone Lite](https://docs.ecotone.tech/install-php-service-bus#install-ecotone-lite-no-framework).
>
## Getting started
{{One-paragraph description of what this package adds to Ecotone and the primary use case.}}

- {{Key capability 1}}
- {{Key capability 2}}
- {{Key capability 3}}

The quickstart [page](https://docs.ecotone.tech/quick-start) of the
[reference guide](https://docs.ecotone.tech) provides a starting point for using Ecotone.
Read more on the [Ecotone's Blog](https://blog.ecotone.tech).
Visit [ecotone.tech](https://ecotone.tech) to learn more.

## AI-Friendly Documentation
> Works with [Symfony](https://docs.ecotone.tech/modules/symfony-ddd-cqrs-event-sourcing), [Laravel](https://docs.ecotone.tech/modules/laravel-ddd-cqrs-event-sourcing), or any PSR-11 framework via [Ecotone Lite](https://docs.ecotone.tech/install-php-service-bus#install-ecotone-lite-no-framework).

## Getting started

Ecotone provides AI-optimized documentation for use with AI assistants and code editors:
See the [quickstart guide](https://docs.ecotone.tech/quick-start) and [reference documentation](https://docs.ecotone.tech). Read more on the [Ecotone Blog](https://blog.ecotone.tech).

- **MCP Server**: `https://docs.ecotone.tech/~gitbook/mcp` - [Install in VSCode](vscode:mcp/install?%7B%22name%22%3A%22Ecotone%22%2C%22url%22%3A%22https%3A%2F%2Fdocs.ecotone.tech%2F~gitbook%2Fmcp%22%7D)
- **LLMs.txt**: [ecotone.tech/llms.txt](https://ecotone.tech/llms.txt)
- **Context7**: Available via [@upstash/context7-mcp](https://github.com/upstash/context7)
## AI-Ready documentation

Learn more: [AI Integration Guide](https://docs.ecotone.tech/other/ai-integration)
Ecotone ships with MCP server, Agentic Skills, and LLMs.txt for any coding agent. See the [AI Integration Guide](https://docs.ecotone.tech/other/ai-integration).

## Feature requests and issue reporting

Use [issue tracking system](https://github.com/ecotoneframework/ecotone-dev/issues) for new feature request and bugs.
Use [issue tracking system](https://github.com/ecotoneframework/ecotone-dev/issues) for new feature request and bugs.
Please verify that it's not already reported by someone else.

## Contact
Expand All @@ -60,4 +57,4 @@ If you want to help building and improving Ecotone consider becoming a sponsor:

## Tags

PHP, DDD, CQRS, Event Sourcing, Symfony, Laravel, Service Bus, Event Driven Architecture, SOA, Events, Commands
PHP, Ecotone, {{package-specific tags}}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"ecotone",
"service-bus"
],
"description": "Ecotone is Service Bus Implementation, which enables message driven architecture with DDD, CQRS, Event Sourcing in PHP",
"description": "Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Sagas, Projections, Workflows, and Outbox messaging via PHP attributes.",
"autoload": {
"psr-4": {
"Ecotone\\": [
Expand Down
48 changes: 20 additions & 28 deletions packages/Amqp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,24 @@ To contribute make use of [Ecotone-Dev repository](https://github.com/ecotonefra
[![Total Downloads](https://img.shields.io/packagist/dt/ecotone/ecotone)](https://packagist.org/packages/ecotone/ecotone)
[![PHP Version Require](https://img.shields.io/packagist/dependency-v/ecotone/ecotone/php.svg)](https://packagist.org/packages/ecotone/ecotone)

The roots of Object Oriented Programming (OOP) were mainly about communication using Messages and logic encapsulation.
`Ecotone` aims to return to the origins of OOP, by providing tools which allows us to fully move the focus from Objects to Flows, from Data storage to Application Design, from Technicalities to Business logic.
Ecotone does that by making Messages first class-citizen in our Applications.
**Ecotone is the enterprise architecture layer for Laravel and Symfony.**

Thanks to being Message-Driven at the foundation level, Ecotone provides architecture which is resilient and scalable by default, making it possible for Developers to focus on business problems instead of technical concerns.
Together with declarative configuration and higher level building blocks, it makes the system design explicit, easy to follow and change no matter of Developers experience.
One Composer package adds CQRS, Event Sourcing, Sagas, Projections, Workflows, and Outbox messaging to your existing application — all via declarative PHP 8 attributes on the classes you already have.

Visit main page [ecotone.tech](https://ecotone.tech) to learn more.
## AMQP / RabbitMQ transport

> Ecotone can be used with [Symfony](https://docs.ecotone.tech/modules/symfony-ddd-cqrs-event-sourcing) and [Laravel](https://docs.ecotone.tech/modules/laravel-ddd-cqrs-event-sourcing) frameworks, or any other framework using [Ecotone Lite](https://docs.ecotone.tech/install-php-service-bus#install-ecotone-lite-no-framework).
Route `#[Asynchronous]` handlers to RabbitMQ. Exchanges, queues, and bindings are declared from your PHP configuration, and every message flows through Ecotone's standard retry, outbox, and dead letter pipeline — so switching to AMQP in production never changes how your handlers or tests are written.

## Getting started

The quickstart [page](https://docs.ecotone.tech/quick-start) of the
[reference guide](https://docs.ecotone.tech) provides a starting point for using Ecotone.
Read more on the [Ecotone's Blog](https://blog.ecotone.tech).

## AI-Friendly Documentation
Supports both implementations:

Ecotone provides AI-optimized documentation for use with AI assistants and code editors:
- **AMQP Extension** (`enqueue/amqp-ext` + `ext-amqp`) — default, recommended for production
- **AMQP Lib** (`enqueue/amqp-lib`) — pure PHP, required for RabbitMQ Streams

- **MCP Server**: `https://docs.ecotone.tech/~gitbook/mcp` - [Install in VSCode](vscode:mcp/install?%7B%22name%22%3A%22Ecotone%22%2C%22url%22%3A%22https%3A%2F%2Fdocs.ecotone.tech%2F~gitbook%2Fmcp%22%7D)
- **LLMs.txt**: [ecotone.tech/llms.txt](https://ecotone.tech/llms.txt)
- **Context7**: Available via [@upstash/context7-mcp](https://github.com/upstash/context7)

Learn more: [AI Integration Guide](https://docs.ecotone.tech/other/ai-integration)

## AMQP Package
See [AMQP_IMPLEMENTATION_SUPPORT.md](AMQP_IMPLEMENTATION_SUPPORT.md) for detailed information about using both implementations.

This package provides AMQP integration for Ecotone, supporting both:
- **AMQP Extension** (`enqueue/amqp-ext` + `ext-amqp`) - Default, recommended for production
- **AMQP Lib** (`enqueue/amqp-lib`) - Pure PHP, required for RabbitMQ Streams
Visit [ecotone.tech](https://ecotone.tech) to learn more.

See [AMQP_IMPLEMENTATION_SUPPORT.md](AMQP_IMPLEMENTATION_SUPPORT.md) for detailed information about using both implementations.
> Works with [Symfony](https://docs.ecotone.tech/modules/symfony-ddd-cqrs-event-sourcing), [Laravel](https://docs.ecotone.tech/modules/laravel-ddd-cqrs-event-sourcing), or any PSR-11 framework via [Ecotone Lite](https://docs.ecotone.tech/install-php-service-bus#install-ecotone-lite-no-framework).

### Testing

Expand All @@ -57,9 +41,17 @@ composer tests:ci

See [TESTING_BOTH_IMPLEMENTATIONS.md](TESTING_BOTH_IMPLEMENTATIONS.md) for more details.

## Getting started

See the [quickstart guide](https://docs.ecotone.tech/quick-start) and [reference documentation](https://docs.ecotone.tech). Read more on the [Ecotone Blog](https://blog.ecotone.tech).

## AI-Ready documentation

Ecotone ships with MCP server, Agentic Skills, and LLMs.txt for any coding agent. See the [AI Integration Guide](https://docs.ecotone.tech/other/ai-integration).

## Feature requests and issue reporting

Use [issue tracking system](https://github.com/ecotoneframework/ecotone-dev/issues) for new feature request and bugs.
Use [issue tracking system](https://github.com/ecotoneframework/ecotone-dev/issues) for new feature request and bugs.
Please verify that it's not already reported by someone else.

## Contact
Expand All @@ -79,4 +71,4 @@ If you want to help building and improving Ecotone consider becoming a sponsor:

## Tags

PHP, DDD, CQRS, Event Sourcing, Symfony, Laravel, Service Bus, Event Driven Architecture, SOA, Events, Commands
PHP, AMQP, RabbitMQ, Ecotone, Message Broker, Asynchronous Messaging, Event Driven Architecture
2 changes: 1 addition & 1 deletion packages/Amqp/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"distributed architecture",
"domain driven design"
],
"description": "Extends Ecotone with AMQP integration",
"description": "AMQP / RabbitMQ transport for Ecotone asynchronous messaging, outbox, and dead letter.",
"autoload": {
"psr-4": {
"Ecotone\\Amqp\\": "src"
Expand Down
Loading
Loading