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)016.9k↓33.3%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 1mo ago

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 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

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

900d 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://www.gravatar.com/avatar/8e7f1ac17d459ceafe85508655b9bca4ec9283adf5f3e9c0fc7b6050f5df5988?d=identicon)[mordilion](/maintainers/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

[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58723.9M36](/packages/scienta-doctrine-json-functions)[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.

4485.3M4](/packages/martin-georgiev-postgresql-for-doctrine)[damienharper/auditor-bundle

Integrate auditor library in your Symfony projects.

4542.8M](/packages/damienharper-auditor-bundle)[sonata-project/entity-audit-bundle

Audit for Doctrine Entities

644989.8k1](/packages/sonata-project-entity-audit-bundle)[overtrue/laravel-versionable

Make Laravel model versionable.

585308.0k5](/packages/overtrue-laravel-versionable)[worksome/foggy

Foggy is a tool for making database dumps with some data removed/changed.

26571.7k1](/packages/worksome-foggy)

PHPackages © 2026

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