remi-san / transaction-manager
A simple transaction manager
Installs: 54 409
Dependents: 3
Suggesters: 3
Security: 0
Stars: 2
Watchers: 2
Forks: 1
Open Issues: 1
Requires
- php: >=5.5
Requires (Dev)
- doctrine/dbal: ^2.5
- doctrine/orm: ^2.5
- evaneos/burrow: ^4.0
- fabpot/php-cs-fixer: ^1.10
- henrikbjorn/phpspec-code-coverage: ^2.0
- league/event: ^2.1
- league/tactician: ^1.0
- phpspec/phpspec: ^2.2
- squizlabs/php_codesniffer: ^2.0
Suggests
- doctrine/dbal: To manage Doctrine DBAL transactions
- doctrine/orm: To manage Doctrine EntityManager transactions
- evaneos/burrow: To manage AMQP message broking transactionally
- league/event: To manage event emitting transactionally
- league/tactician: To manage command emitting transactionally
This package is auto-updated.
Last update: 2024-10-21 22:46:29 UTC
README
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 ifcommit
is called the same number of times asbeginTransaction
.
Implementations
Some Transactional
implementations are provided:
TransactionalQueuePublisher
to publish in an AMQP queue withBurrow
in a transactionDoctrineDbalTransactionManager
to deal withDoctrine DBAL
transactionsDoctrineEntityManager
to deal withDoctrine ORM
transactionsTransactionalEmitter
to emitEvents
with thePHP League
lib in a transactionTransactionalCommandBus
to handleCommands
with thePHP League
lib in a transaction