jaspernbrouwer / doctrine-dbal-bridge
This package is abandoned and no longer maintained.
The author suggests using the simple-bus/doctrine-dbal-bridge package instead.
Bridge for using SimpleBus with Doctrine DBAL
v2.0.0
2015-02-10 15:50 UTC
Requires
- php: >=5.4
- doctrine/dbal: ~2.3
- simple-bus/message-bus: ~1.0
Requires (Dev)
- phpunit/phpunit: ~4.3
This package is not auto-updated.
Last update: 2022-02-01 12:43:04 UTC
README
A bridge for using SimpleBus with Doctrine DBAL.
Deprecated
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.
Versions
Version 1.x is compatible with SimpleBus/CommandBus.
Version 2.x is compatible with SimpleBus/MessageBus.
Installation
Using Composer:
composer require jaspernbrouwer/doctrine-dbal-bridge
Usage
- 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);