Download the PHP package adgoal/dbal-fault-tolerance without Composer

On this page you can find all versions of the php package adgoal/dbal-fault-tolerance. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dbal-fault-tolerance

Latest Stable Version Latest Unstable Version Total Downloads

Build status Scrutinizer score Test coverage

License

DBALFaultTolerance

Auto reconnect on Doctrine MySql has gone away exceptions on doctrine/dbal >=2.3, <3.0.

Installation

Configuration

In order to use DBALFaultTolerance you have to set wrapperClass and driverClass connection params. You can choose how many times Doctrine should be able to reconnect, setting x_reconnect_attempts driver option. Its value should be an int.

You can force ignore the transaction level using the parameters : force_ignore_transaction_level.

An example of configuration at connection instantiation time:

An example of yaml configuration on Symfony 2 projects:

An example of configuration on Zend Framework 2/3 projects:

You can use wrapper class Adgoal\DBALFaultTolerance\Connections\MasterSlaveConnection if you are using master / slave Doctrine configuration.

Usage

To force a reconnection try after a long running task you can call

before performing any other operation different from SELECT.

Instead, in case your next query will be a SELECT, reconnection will be automagically done.

From v1.6 automagically reconnection is enabled also during $em->getConnection()->beginTransaction() calls, and this works also during simple $em->flush(), if out of a previous transaction.

Thanks

Thanks to Dieter Peeters and his proposal on DBAL-275. Check it out if you are using doctrine/dbal <2.3.


All versions of dbal-fault-tolerance with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
ext-pdo Version *
doctrine/dbal Version ^2.3
psr/log Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package adgoal/dbal-fault-tolerance contains the following files

Loading the files please wait ....