PHPackages                             inlm/dibi-transactions - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. inlm/dibi-transactions

ActiveLibrary[Database &amp; ORM](/categories/database)

inlm/dibi-transactions
======================

Nested transactions for Dibi.

v1.1.0(1y ago)19.3k↓66.7%BSD-3-ClausePHPPHP 8.0 - 8.4CI passing

Since Sep 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/inlm/dibi-transactions)[ Packagist](https://packagist.org/packages/inlm/dibi-transactions)[ Fund](https://www.janpecha.cz/donate/)[ RSS](/packages/inlm-dibi-transactions/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (4)Versions (5)Used By (0)

Inlm\\DibiTransactions
======================

[](#inlmdibitransactions)

[![Build Status](https://github.com/inlm/dibi-transactions/workflows/Build/badge.svg)](https://github.com/inlm/dibi-transactions/actions)[![Downloads this Month](https://camo.githubusercontent.com/cb81a10dae07ad01b7a9b3c70498a131149259d44b0983f8dbc290361c83a66f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f696e6c6d2f646962692d7472616e73616374696f6e732e737667)](https://packagist.org/packages/inlm/dibi-transactions)[![Latest Stable Version](https://camo.githubusercontent.com/7ba2b66e2587cdf096db7b022446d93e040f5a5fd34dbc77cc278b8b4b850351/68747470733a2f2f706f7365722e707567782e6f72672f696e6c6d2f646962692d7472616e73616374696f6e732f762f737461626c65)](https://github.com/inlm/dibi-transactions/releases)[![License](https://camo.githubusercontent.com/fa7d5fcf2c84b580327af52da95dd751703af65f079dc3c5a0081beac0789718/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4e65772532304253442d626c75652e737667)](https://github.com/inlm/dibi-transactions/blob/master/license.md)

Nested transactions for Dibi.

[![Donate](https://camo.githubusercontent.com/101b981194f1dafbf9c42e19c3034fe2d724e75be972cef0f4477074997834db/68747470733a2f2f6275796d65636f666665652e696e746d2e6f72672f696d672f646f6e6174652d62616e6e65722e76312e737667)](https://www.janpecha.cz/donate/)

Installation
------------

[](#installation)

[Download a latest package](https://github.com/inlm/dibi-transactions/releases) or use [Composer](http://getcomposer.org/):

```
composer require inlm/dibi-transactions

```

Inlm\\Dibi-transactions requires PHP 8.0 or later and [Dibi](https://dibiphp.com).

Usage
-----

[](#usage)

```
$connection = new Dibi\Connection();
$transactions = new Inlm\DibiTransactions\Transactions($connection);
```

### `transactional()`

[](#transactional)

```
$value = $transactions->transactional(function () use ($connection) {
	$connection->query('...');
	$connection->query('...');
	return $value;
});
```

### `Transaction`

[](#transaction)

```
$transaction = $transactions->createTransaction();

try {
	$connection->query('...');
	$connection->query('...');
	$transaction->commit();

} catch (Exception $e) {
	$transaction->rollback();
	throw $e;
}
```

Object `Transaction` throws error if you forget to call `commit()` or `rollback()`. It can be connected with [Tracy](https://tracy.nette.org/):

```
$transactions->onUnresolved[] = array(Inlm\DibiTransactions\Bridges\Tracy::class, 'logUnresolved');
```

### `begin` / `commit` / `rollback`

[](#begin--commit--rollback)

```
try {
	$transactions->begin();
	$connection->query('...');
	$connection->query('...');
	$transactions->commit();

} catch (Exception $e) {
	$transactions->rollback();
}
```

---

License: [New BSD License](license.md)
Author: Jan Pecha,

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance49

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 96.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~946 days

Total

4

Last Release

373d ago

Major Versions

v0.7.1 → v1.0.02021-10-15

PHP version history (3 changes)v0.7.0PHP &gt;=5.4.0

v1.0.0PHP &gt;=5.6.0

v1.1.0PHP 8.0 - 8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c980b1511b4a0350442dc23d89c99d4d9a2411b7e765d52c133ccacf616968b?d=identicon)[janpecha](/maintainers/janpecha)

---

Top Contributors

[![janpecha](https://avatars.githubusercontent.com/u/637719?v=4)](https://github.com/janpecha "janpecha (25 commits)")[![inovobot](https://avatars.githubusercontent.com/u/105303666?v=4)](https://github.com/inovobot "inovobot (1 commits)")

---

Tags

dibidibi-transactionsnested-transactionsphptransaction

### Embed Badge

![Health badge](/badges/inlm-dibi-transactions/health.svg)

```
[![Health](https://phpackages.com/badges/inlm-dibi-transactions/health.svg)](https://phpackages.com/packages/inlm-dibi-transactions)
```

###  Alternatives

[tharos/leanmapper

Tiny ORM based on powerful Dibi database abstraction library for PHP.

93157.3k32](/packages/tharos-leanmapper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
