nalogka / doctrine-reconnect-bundle
Installs: 2 461
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.1.3
- doctrine/dbal: ^2.5
- symfony/config: ^4.1
- symfony/dependency-injection: ^4.1
- symfony/http-kernel: ^4.1
This package is auto-updated.
Last update: 2025-03-27 19:56:50 UTC
README
Symfony bundle that checks connection has alive and reconnects if has not.
Installing
composer require nalogka/doctrine-reconnect-bundle
After that you can set up retries limit and time interval between retries:
# file: config/packages/doctrine_reconnect.yaml doctrine_reconnect: max_retries: 12 wait_before_retry: 333333 # microseconds
Doctrine configuration
Set connection wrapper class provided by Bundle as Doctrine DBAL Wrapper
# file: config/packages/doctrine.yaml doctrine: dbal: wrapper_class: Nalogka\DoctrineReconnectBundle\DBAL\ConnectionWrapper