A bridge for using SimpleBus with Doctrine DBAL.
This package is deprecated and has been moved to SimpleBus/DoctrineDBALBridge!
You may still use version 1.x if you're using SimpleBus/CommandBus. But for SimpleBus/MessageBus, please switch to SimpleBus/DoctrineDBALBridge, this package will no longer be maintained.
Version 1.x is compatible with SimpleBus/CommandBus.
Version 2.x is compatible with SimpleBus/MessageBus.
Using Composer:
composer require jaspernbrouwer/doctrine-dbal-bridge
- Set up a command bus:
$commandBus = ...;
- Set up a Doctrine DBAL connection:
$connection = ...;
- Set up the WrapsMessageHandlingInTransaction middleware:
use JNB\DoctrineDBALBridge\MessageBus\WrapsMessageHandlingInTransaction;
$transactionalMiddleware = new WrapsMessageHandlingInTransaction($connection);
- Add the middleware to the command bus:
$commandBus->addMiddleware($transactionalMiddleware);