NestedTransactionManager
class NestedTransactionManager implements TransactionManager
TransactionManager decorator that adds virtual nesting support.
Because this is managed in PHP and not the database, it has the following limitations: - Committing a nested transaction won't change anything until the parent transaction is committed - Rolling back a nested transaction means that the parent transaction must be rolled backed
DBAL describes this behaviour nicely in their docs: https://www.doctrine-project.org/projects/doctrine-dbal/en/2.8/reference/transactions.html#transaction-nesting
Methods
Start a transaction
Complete a transaction
Roll-back a transaction
Return the depth of the transaction.
Create a new savepoint
Return true if savepoints are supported by this transaction manager.
Details
at line 37
__construct(TransactionManager $child)
Create a NestedTransactionManager
at line 47
bool
transactionStart(string|boolean $transactionMode = false, string|boolean $sessionCharacteristics = false)
Start a transaction
at line 60
bool
transactionEnd($chain = false)
Complete a transaction
at line 81
bool
transactionRollback(string $savepoint = null)
Roll-back a transaction
at line 113
int
transactionDepth()
Return the depth of the transaction.
at line 118
transactionSavepoint(string $savepoint)
Create a new savepoint
at line 123
boolean
supportsSavepoints()
Return true if savepoints are supported by this transaction manager.
Savepoints aren't supported by all database connectors (notably PDO doesn't support them) and should be used with caution.