Download the PHP package facile-it/doctrine-mysql-come-back without Composer

On this page you can find all versions of the php package facile-it/doctrine-mysql-come-back. 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 doctrine-mysql-come-back

Latest Stable Version Latest Unstable Version Total Downloads

Build status Test coverage License

DoctrineMySQLComeBack

This library tries to solve the infamous "MySQL has gone away" issue, and similar ones.

It does so by providing a doctrine/dbal driver wrapper that automatically reconnects to the database server when applicable; to avoid consistency issues, the reconnection is not attempted when writes are concerned (i.e. open transaction, timeout on write queries).

Installation

If you're using DBAL 4.0+

If you're using DBAL 3.6+

If you're using DBAL ^2.3

Configuration

In order to use DoctrineMySQLComeBack you have to set the wrapperClass connection parameter. You can choose how many times Doctrine should be able to reconnect, setting x_reconnect_attempts driver option. Its value must be an int.

If you're using DBAL v2, you also need to set the driverClass parameter too; please refer to the previous version of this readme for that.

An example of configuration at connection instantiation time:

An example of yaml configuration on Symfony projects:

An example of configuration on Laminas Framework 2projects:

You can use wrapper class Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Connections\PrimaryReadReplicaConnection if you are using a primary/replica Doctrine configuration:

Usage

Since DBAL v3, Connection::refresh does not exist anymore, so you don't need to do anything else to leverage the reconnection, it will be automagically done.

From v1.6 of this library 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 doctrine-mysql-come-back with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
doctrine/dbal Version ^4.0.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 facile-it/doctrine-mysql-come-back contains the following files

Loading the files please wait ....