2017 © Pedro Peláez
 

library messaging-symfony-bridge

This is a bridge providing DI for maxkaemmerer/events and maxkaemmerer/command in symfony.

image

maxkaemmerer/messaging-symfony-bridge

This is a bridge providing DI for maxkaemmerer/events and maxkaemmerer/command in symfony.

  • Tuesday, July 24, 2018
  • by maxkaemmerer
  • Repository
  • 0 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

maxkaemmerer/messaging-symfony-bridge

This is a bridge providing DI for maxkaemmerer/events and maxkaemmerer/command in symfony., (*1)

Just register the needed compiler passes in your symfony Kernel as seen below., (*2)

CommandBus and EventCourier are automatically registered as services., (*3)

Every symfony service implementing CommandHandler or EventSubscriber get automatically registered in the EventCourier or CommandBus., (*4)

So the only thing you need to do is start dispatching commands and events implementing the corresponding interfaces Command and Event, as seen in the documentation of maxkaemmerer/events and maxkaemmerer/commands. ;), (*5)

Symfony Kernel:, (*6)

use MaxKaemmerer\MessagingSymfonyBridge\CompilerPass\CommandBusPass;
use MaxKaemmerer\MessagingSymfonyBridge\CompilerPass\EventCourierPass;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
use Symfony\Component\Routing\RouteCollectionBuilder;

class Kernel extends BaseKernel
{

    // ...

    protected function build(ContainerBuilder $container)
    {
        $container->addCompilerPass(new CommandBusPass());
        $container->addCompilerPass(new EventCourierPass());
        parent::build($container);
    }

    // ...

 }

More detailed examples might follow., (*7)

The Versions

24/07 2018

dev-master

9999999-dev

This is a bridge providing DI for maxkaemmerer/events and maxkaemmerer/command in symfony.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Max Kaemmerer

php composer library commands events symfony messaging package bridge

24/07 2018

v0.1.0

0.1.0.0

This is a bridge providing DI for maxkaemmerer/events and maxkaemmerer/command in symfony.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Max Kaemmerer

php composer library commands events symfony messaging package bridge