remi-san/transaction-manager

A simple transaction manager

v2.1.1 2018-07-12 11:57 UTC

This package is auto-updated.

Last update: 2024-10-21 22:46:29 UTC


README

Author Build Status Quality Score Software License Packagist Version Coverage Status SensioLabsInsight

A simple transaction manager with a naive implementation.

It provides a common interface to manage transactions.

If you want to make a class transactional, implement the Transactional interface.

Transaction Manager

Two TransactionManager implementations are provided allowing you to manage multiple Transactional classes in the same logic transaction.

  • SimpleTransactionManager is a naive implementation preventing from beginning a transaction more than once.
  • MultipleTransactionManager allows you to begin the transaction more than once but only commits if commit is called the same number of times as beginTransaction.

Implementations

Some Transactional implementations are provided:

  • TransactionalQueuePublisher to publish in an AMQP queue with Burrow in a transaction
  • DoctrineDbalTransactionManager to deal with Doctrine DBAL transactions
  • DoctrineEntityManager to deal with Doctrine ORM transactions
  • TransactionalEmitter to emit Events with the PHP League lib in a transaction
  • TransactionalCommandBus to handle Commands with the PHP League lib in a transaction