PHPackages                             mordilion/doctrine-connection-keeper - 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. mordilion/doctrine-connection-keeper

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

mordilion/doctrine-connection-keeper
====================================

A library to keep the Doctrine DBAL connection alive

v1.0.0(4y ago)017.9k↓71.6%MITPHPPHP ^7.4 || ^8.0

Since Mar 16Pushed 2y ago2 watchersCompare

[ Source](https://github.com/mordilion/DoctrineConnectionKeeper)[ Packagist](https://packagist.org/packages/mordilion/doctrine-connection-keeper)[ RSS](/packages/mordilion-doctrine-connection-keeper/feed)WikiDiscussions main Synced yesterday

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

DoctrineConnectionKeeper
========================

[](#doctrineconnectionkeeper)

Keep the connection to your MySQL-Server alive!

If an error happens like "MySQL server has gone away", then it will retry the failed statement. If the error happens again after the maximum retry attempts, then it throws it.

Config Example
--------------

[](#config-example)

```
use \Mordilion\DoctrineConnectionKeeper\Doctrine\DBAL\Connection;

return [
    'doctrine' => [
        'connection' => [
            'orm_default' => [
                'wrapperClass' => Connection::class,
                'params' => [
                    'driver' => 'pdo_mysql',
                    'host' => 'localhost',
                    'port' => '3307',
                    'user' => '***',
                    'password' => '***',
                    'dbname' => '***',
                    'charset' => 'UTF8',
                    'connection_keeper' => [            // settings for the connection keeper
                        'reconnect_attempts' => 3,      // how often should it try to reconnect?
                        'refresh_on_exception' => true, // should it refresh the connection on an exception?
                    ],
                ],
            ],
        ],
    ],
];
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

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 ~312 days

Total

3

Last Release

946d ago

Major Versions

v1.x-dev → v2.x-dev2023-11-30

PHP version history (2 changes)v1.0.0PHP ^7.4 || ^8.0

v2.x-devPHP ^7.4 || ^8.0 || ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/548671?v=4)[Henning Huncke](/maintainers/mordilion)[@mordilion](https://github.com/mordilion)

---

Top Contributors

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

###  Code Quality

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mordilion-doctrine-connection-keeper/health.svg)

```
[![Health](https://phpackages.com/badges/mordilion-doctrine-connection-keeper/health.svg)](https://phpackages.com/packages/mordilion-doctrine-connection-keeper)
```

###  Alternatives

[martin-georgiev/postgresql-for-doctrine

Extends Doctrine with native PostgreSQL support for arrays, JSONB, ranges, PostGIS geometries, text search, ltree, uuid, and 100+ PostgreSQL-specific functions.

4585.8M4](/packages/martin-georgiev-postgresql-for-doctrine)[flow-php/doctrine-dbal-bulk

Bulk inserts and updates for Doctrine DBAL

14385.8k4](/packages/flow-php-doctrine-dbal-bulk)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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