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

This package is not auto-updated.

Last update: 2022-02-01 12:43:04 UTC


README

A bridge for using SimpleBus with Doctrine DBAL.

By Jasper N. Brouwer

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

  1. Set up a command bus:
$commandBus = ...;
  1. Set up a Doctrine DBAL connection:
$connection = ...;
  1. Set up the WrapsMessageHandlingInTransaction middleware:
use JNB\DoctrineDBALBridge\MessageBus\WrapsMessageHandlingInTransaction;

$transactionalMiddleware = new WrapsMessageHandlingInTransaction($connection);
  1. Add the middleware to the command bus:
$commandBus->addMiddleware($transactionalMiddleware);