PHPackages                             lightools/transaction-nesting - 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. lightools/transaction-nesting

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

lightools/transaction-nesting
=============================

Allows you to nest transactions with dibi database connection.

v1.0.1(10y ago)114.1k↓100%MITPHPPHP &gt;=5.4

Since Mar 22Pushed 10y ago1 watchersCompare

[ Source](https://github.com/lightools/transaction-nesting)[ Packagist](https://packagist.org/packages/lightools/transaction-nesting)[ RSS](/packages/lightools-transaction-nesting/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

Introduction
------------

[](#introduction)

This library allows you to nest database transactions over dibi connection.

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

[](#installation)

```
$ composer require lightools/transaction-nesting
```

Simple usage
------------

[](#simple-usage)

TransactionManager will begin/commit/rollback database transaction only if there is no other transaction running. So if you try to start new transaction when some transaction is active, it will not fail with error `There is already an active transaction`. This means you can nest transactions safely and TransactionManager will make sure that only the outer transaction will be performed.

```
$dibi = new Dibi\Connection($config);
$manager = new Lightools\TransactionNesting\TransactionManager($dibi);

$manager->transactional(function () {
    // your logic
});
```

Of course, this will break if you perform some query causing implicit commit (for example ALTER TABLE on MySQL).

How to run tests
----------------

[](#how-to-run-tests)

```
$ vendor/bin/tester -c tests/php.ini -d extension_dir=ext tests
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~21 days

Total

2

Last Release

3678d ago

### Community

Maintainers

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

---

Top Contributors

[![janedbal](https://avatars.githubusercontent.com/u/1993453?v=4)](https://github.com/janedbal "janedbal (6 commits)")

---

Tags

database-transactionsdibi

### Embed Badge

![Health badge](/badges/lightools-transaction-nesting/health.svg)

```
[![Health](https://phpackages.com/badges/lightools-transaction-nesting/health.svg)](https://phpackages.com/packages/lightools-transaction-nesting)
```

###  Alternatives

[tharos/leanmapper

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

93150.7k29](/packages/tharos-leanmapper)

PHPackages © 2026

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