PHPackages                             xj/yii2-db-reconnect - 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. xj/yii2-db-reconnect

ActiveLibrary

xj/yii2-db-reconnect
====================

yii2-db-auto-reconnect

1.0.0(9y ago)21.2kBSD-3-ClausePHP

Since May 18Pushed 9y ago1 watchersCompare

[ Source](https://github.com/xjflyttp/yii2-db-reconnect)[ Packagist](https://packagist.org/packages/xj/yii2-db-reconnect)[ RSS](/packages/xj-yii2-db-reconnect/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

yii2-db-reconnect
=================

[](#yii2-db-reconnect)

### composer

[](#composer)

```
"require": {
    "xj/yii2-db-reconnect": "~1.0"
},
```

### config

[](#config)

```
'db' => [
//    'class' => 'yii\db\Connection',
    'class' => 'xj\dbreconnect\mysql\Connection', //add
    'reconnectMaxCount' => 2,
    //normal
    'dsn' => 'mysql:host=127.0.0.1;dbname=test',
    'username' => 'root',
    'password' => '',
    'charset' => 'utf8',
],
```

### log

[](#log)

```
'log' => [
    'targets' => [
        [
            'class' => 'yii\log\FileTarget',
            'levels' => ['error', 'info'],
            'maxLogFiles' => 20,
            'maxFileSize' => 2048,
            'categories' => [
                'xj\dbreconnect\*',
            ],
            'logFile' => '@frontend/runtime/logs/dbreconnect.log',
        ],
    ],
],
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

Unknown

Total

1

Last Release

3647d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f9f04ccc1ccda3af80975323425ff7d5f7d142603f1ad05df6558ffa63256f8d?d=identicon)[xjflyttp](/maintainers/xjflyttp)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/xj-yii2-db-reconnect/health.svg)

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

PHPackages © 2026

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