PHPackages                             stefano/stefano-db - 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. stefano/stefano-db

Abandoned → [zendframework/zend-db](/?search=zendframework%2Fzend-db)Library[Database &amp; ORM](/categories/database)

stefano/stefano-db
==================

Db Modul extend Zend Framework 2

1.5.0(8y ago)06.5k1BSD-3-ClausePHPPHP &gt;=7.0.0

Since May 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/bartko-s/stefano-db)[ Packagist](https://packagist.org/packages/stefano/stefano-db)[ Docs](https://github.com/bartko-s/stefano-db)[ RSS](/packages/stefano-stefano-db/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (6)Versions (19)Used By (0)

\[DEPRECATED\] Stefano Db
=========================

[](#deprecated-stefano-db)

Zend DB from [v.2.4.0](https://github.com/zendframework/zend-db/releases/tag/release-2.4.0) support nested transactions. Please use [Zend Db](https://github.com/zendframework/zend-db/) instead of this library. This library is NOT MAINTAINED anymore.

[![Build Status](https://camo.githubusercontent.com/9df8ffebbdbcbb1afec695de5bf6c0c7c0cc7af8ff8ef79719a9d35fa24f8d34/68747470733a2f2f6170702e7472617669732d63692e636f6d2f626172746b6f2d732f73746566616e6f2d64622e7376673f6272616e63683d6d6173746572)](https://app.travis-ci.com/bartko-s/stefano-db)[![Code Coverege](https://camo.githubusercontent.com/b2af483ffb530c4215c8b08599e744aaf325e78bd9c8b9b51daefbfd23e6ff0f/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f626172746b6f2d732f73746566616e6f2d64622f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/bartko-s/stefano-db?branch=master)

Installation using Composer
---------------------------

[](#installation-using-composer)

1. Run command `composer require stefano/stefano-db`

Features
--------

[](#features)

- extend Zend Framework 2 Database adapter. For more info see [Zend Db](http://framework.zend.com/manual/2.3/en/index.html#zend-db)
- nested transaction. For more info see [Stefano nested transaction](https://github.com/bartko-s/stefano-nested-transaction/)
- execute defined queries after db connection will be created

Db Adapter Configuration
------------------------

[](#db-adapter-configuration)

```
//$option for more info see Zend Framework 2 Db documentation
$adapter = new \StefanoDb\Adapter\Adapter($options);

```

Nested transaction API
----------------------

[](#nested-transaction-api)

```
$adapter->begin();
$adapter->commit();
$adapter->rollback();

```

Usage with Zend Framework 2 MVC
-------------------------------

[](#usage-with-zend-framework-2-mvc)

- single DB connection configuration

```
return array(
    //single DB connection
    'db' => array(
        'driver' => '',
        'database' => '',
        'username' => '',
        'password' => '',
        'sqls' => array(
            "SET time_zone='+0:00'",
            "....."
        ),
    ),
    'service_manager' => array(
        'factories' => array(
            'Zend\Db\Adapter\Adapter'
                => '\StefanoDb\Adapter\Service\AdapterServiceFactory',
        ),
    ),
);

```

- multiple DB connection configuration

```
return array(
    'db' => array(
        'adapters' => array(
            'Db/Write' => array(
                'driver' => '',
                'database' => '',
                'username' => '',
                'password' => '',
                'sqls' => array(
                    "SET time_zone='+0:00'",
                    "....."
                ),
            ),
            'Db/Read' => array(
                'driver' => '',
                'database' => '',
                'username' => '',
                'password' => '',
                'sqls' => array(
                    "SET time_zone='+0:00'",
                    "....."
                ),
            ),
        ),
    ),
    'service_manager' => array(
        'abstract_factories' => array(
            '\StefanoDb\Adapter\Service\AdapterAbstractServiceFactory',
        ),
    ),
);

```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 98.8% 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 ~98 days

Recently: every ~301 days

Total

17

Last Release

3203d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.3.0

1.5.0PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/12da8e2ce2685d50df256c7d302dff9de0eeab90057103170ec1c840d26eed19?d=identicon)[Stefano123](/maintainers/Stefano123)

---

Top Contributors

[![bartko-s](https://avatars.githubusercontent.com/u/675883?v=4)](https://github.com/bartko-s "bartko-s (85 commits)")[![tomasfejfar](https://avatars.githubusercontent.com/u/642928?v=4)](https://github.com/tomasfejfar "tomasfejfar (1 commits)")

---

Tags

Nested Db Transaction

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stefano-stefano-db/health.svg)

```
[![Health](https://phpackages.com/badges/stefano-stefano-db/health.svg)](https://phpackages.com/packages/stefano-stefano-db)
```

###  Alternatives

[hounddog/doctrine-data-fixture-module

Zend Framework 2 Module that provides Doctrine Data-Fixture functionality

37335.9k9](/packages/hounddog-doctrine-data-fixture-module)[zfbrasil/doctrine-money-module

Provide ZF2 integration between doctrine and mathiasverraes/money

1627.2k](/packages/zfbrasil-doctrine-money-module)

PHPackages © 2026

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