PHPackages                             iamdevice/codeception-multidb - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. iamdevice/codeception-multidb

ActiveLibrary[Testing &amp; Quality](/categories/testing)

iamdevice/codeception-multidb
=============================

Codeception extension for work with multiple databases

1.0.11(7y ago)1093.8k7[3 issues](https://github.com/iamdevice/codeception-multidb/issues)[1 PRs](https://github.com/iamdevice/codeception-multidb/pulls)MITPHPPHP &gt;=5.6.0

Since Jan 26Pushed 7y ago4 watchersCompare

[ Source](https://github.com/iamdevice/codeception-multidb)[ Packagist](https://packagist.org/packages/iamdevice/codeception-multidb)[ RSS](/packages/iamdevice-codeception-multidb/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (10)Used By (0)

MultiDb module for Codeception
------------------------------

[](#multidb-module-for-codeception)

This module based on original Db module

#### Installation

[](#installation)

```
composer require iamdevice/codeception-multidb

```

Config example

```
modules:
   enabled:
     - MultiDb
   config:
     MultiDb:
       connections:
         masterDb:
           dsn: 'mysql:host=localhost;port=3306;dbname=database'
           user: 'username'
           password: 'password'
           primary: true
           dump: ''
           populate: true
           cleanup: false
           reconnect: true
         slaveDb:
           dsn: 'mysql:host=localhost;port=3307;dbname=database'
           user: 'username'
           password: 'password'
           dump: ''
           populate: true
           cleanup: false
           reconnect: true

```

Before actions with base you need to select Db like

```
$I->amConnectedToDb('primary')

```

or you must define one of the connections as primary with

```
primary: true

```

Aleksandr Kozhevnikov © 2017

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 94.6% 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 ~61 days

Recently: every ~108 days

Total

9

Last Release

2905d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47f639d07dd65f477d36c70aa71d13c478bf31e3de6eeabe2885bad90f1d422a?d=identicon)[iamdevice](/maintainers/iamdevice)

---

Top Contributors

[![iamdevice](https://avatars.githubusercontent.com/u/15125262?v=4)](https://github.com/iamdevice "iamdevice (35 commits)")[![vaclav-easymarkit](https://avatars.githubusercontent.com/u/15903092?v=4)](https://github.com/vaclav-easymarkit "vaclav-easymarkit (2 commits)")

### Embed Badge

![Health badge](/badges/iamdevice-codeception-multidb/health.svg)

```
[![Health](https://phpackages.com/badges/iamdevice-codeception-multidb/health.svg)](https://phpackages.com/packages/iamdevice-codeception-multidb)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)

PHPackages © 2026

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