nalogka/doctrine-reconnect-bundle

Installs: 2 419

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:symfony-bundle

v0.2.1 2019-04-30 12:40 UTC

This package is auto-updated.

Last update: 2024-04-27 18:04:31 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