PHPackages                             swoole-bundle/resetter-bundle - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. swoole-bundle/resetter-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

swoole-bundle/resetter-bundle
=============================

Symfony bundle with resetters for various connections, e.g. doctrine/dbal and phpredis.

2.0.0(3mo ago)39.2k↓32.6%3[5 PRs](https://github.com/symfony-swoole/resetter-bundle/pulls)1MITPHPPHP &gt;=8.3CI passing

Since Feb 1Pushed 3mo agoCompare

[ Source](https://github.com/symfony-swoole/resetter-bundle)[ Packagist](https://packagist.org/packages/swoole-bundle/resetter-bundle)[ Docs](https://github.com/swoole-bundle/resetter-bundle)[ RSS](/packages/swoole-bundle-resetter-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (26)Versions (18)Used By (1)

Doctrine resettable entity manager bundle
=========================================

[](#doctrine-resettable-entity-manager-bundle)

This bundle should be used with workloads where Symfony doesn't get initialized on each request, but stays in memory and the same instance handles multiple requests, one after another (e.g. when using [Swoole Bundle](https://github.com/symfony-swoole/swoole-bundle)). Another use case would be message queue consuming (e.g. Symfony messenger), where it is needed to clear (and possibly reset) the entity manager after processing a message.

The best feature of this bundle is, that it wraps all configured entity managers into a `ResettableEntityManager` instance, which is able to reset the entity manager when it gets stuck on an exception. After each request the entity manager gets cleared or reset, if an exception occurred during request handling.

Also another feature is, that on each request start the entity manager connection gets pinged, so the connection won't get closed after some period of time.

Instalation
-----------

[](#instalation)

`composer require swoole-bundle/resetter-bundle`

SETUP
-----

[](#setup)

```
// config/bundles.php
return [
    //...
    \SwooleBundle\ResetterBundle\SwooleBundleResetterBundle::class => ['all' => true]
    //...
];
```

```
swoole_bundle_resetter:
  exclude_from_processing:
    # these entity managers won't be wrapped by the resettable entity manager:
    entity_managers:
        - readonly
    # these dbal connections won't be assigned to the keep alive handler
    dbal:
      - readonly
    # these redis cluster connections won't be assigned to the keep alive handler
    redis_cluster:
        - default
  # default 0 - if set, the connection ping operation will be executed each X seconds
  # (instead of at the beginning of each request)
  ping_interval: 10
  # default false - if set to true, the app will check if there is an active transaction
  # in the processed connection, and it will rollback the transaction
  check_active_transactions: true
  # for reader writer connections, each has to be defined as 'reader' or 'writer' to be able for the symfony
  # app to reconnect after db failover. currently only AWS Aurora is supported.
  failover_connections:
    default: writer
  # redis clusters which need to be failed over should be registered here
  # it's really important to set default timeouts to a low value, e.g. 2 seconds, so the app won't block for too long
  redis_cluster_connections:
    default: 'RedisCluster' # connection name (can be literally anything) => redis cluster service id
```

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance81

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 81.4% 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 ~93 days

Total

5

Last Release

99d ago

Major Versions

1.2.0 → 2.0.02026-02-08

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

1.2.0PHP &gt;=8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/25edf3c7ac35736a1678135de562169972f1ed17cbe57c0a5a99a384a7d794b4?d=identicon)[swoole-bundle](/maintainers/swoole-bundle)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (83 commits)")[![Rastusik](https://avatars.githubusercontent.com/u/1735097?v=4)](https://github.com/Rastusik "Rastusik (19 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/swoole-bundle-resetter-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/swoole-bundle-resetter-bundle/health.svg)](https://phpackages.com/packages/swoole-bundle-resetter-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)

PHPackages © 2026

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