ideo / transaction
DB transaction library.
1.1
2018-04-12 18:51 UTC
Requires
- php: ^5.4|^7.0
Requires (Dev)
- ext-pdo: *
- ext-sqlite3: *
- doctrine/dbal: ^2.5
- doctrine/orm: ^2.5
- illuminate/container: ^5.0
- illuminate/database: ^5.0
- phpunit/phpunit: ^4.8|^5.7
Suggests
- ext-pdo: Using PDO.
- doctrine/dbal: Using dbal (~2.5).
- doctrine/orm: Using doctrine orm (~2.5).
- illuminate/database: Using laravel (~5.0).
This package is not auto-updated.
Last update: 2024-11-16 09:07:40 UTC
README
We will share different transaction implementations for each framework.
When implementing repository patterns for database access, framework specific classes may be exposed in the service layer transaction implementation, but we will prevent that.
The corresponding framework is as follows.
- PDO
- Doctrine DBAL
- Doctrine ORM
- Laravel
- Lumen
Usage
// class corresponding to each framework
$tm = new ...
$tm->beginTransaction();
...
$tm->commit();
Or
// class corresponding to each framework
$tm = new ...
$tm->transactional(function () {
...
});