Installing Ecotone for Symfony, Laravel or stand alone

Install for Symfony

  1. Use composer in order to download Ecotone Symfony Bundle

composer require ecotone/symfony-bundle

If you're using Symfony Flex, bundle will auto-configure.

2. Register bundle, if needed

new Ecotone\SymfonyBundle\EcotoneSymfonyBundle::class => ['all' => true]

Install for Laravel

  1. Use composer in order to download Ecotone Laravel

composer require ecotone/laravel

Provider should be automatically registered.

2. Register provider, if needed

'providers' => [

Install Lite (No framework)

  1. Use composer in order to download Ecotone

composer require ecotone/ecotone

2. Boostrap Ecotone

use Ecotone\Lite\EcotoneLiteConfiguration;
use Ecotone\Lite\InMemoryPSRContainer;
use Ecotone\Messaging\Config\ApplicationConfiguration;
$rootCatalog = "/var/www/html"; // path to root of your project, where composer.json exists
$namespacesToUse = ["Example\Modelling\EventSourcing"]; // list of namespaces, that should be boostraped by Ecotone
$psr11CompatibleContainer = InMemoryPSRContainer::createFromObjects([TicketRepository::createEmpty()]); // you may use existing in memory implemantation for testing purposes
$messagingSystem = EcotoneLiteConfiguration::createWithConfiguration(

Ecotone is heavily based on annotations to avoid coupling domain with framework code. PHPStorm has great plugin, which allow auto-complete for annotations: