Download the PHP package jdomenechb/renew-doctrine-connection without Composer

On this page you can find all versions of the php package jdomenechb/renew-doctrine-connection. 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 renew-doctrine-connection

Renew Doctrine Connection

This library eases the process of renewing an existing Doctrine connection in your application that has been closed due to a timeout from the server. This might happen when the connection expires or the server has become unavailable.

When the connection is lost, the application usually throws an error like (in MySQL):

It is recommended to install this library only in daemons, consumers, PHP-only servers or very long processes, that is, any PHP project that relies solely in a lengthy PHP process to run. That does not include normal PHP applications running in web servers like Nginx or Apache, unless they have expensive algorythtms that rely on the database. Otherwise, you might be suffering some undesired overhead in your application.

Installation

Add this library to your project using Composer:

Configuration

Modify your Doctrine configuration to use the TimedRenewConnection contained in this library as the wrapper class of Doctrine. In Symfony, for example, configuration will look like:

You can freely customize the parameter secondsToRenew. The database connection will be renewed only after the seconds of inactivity you specify in this parameter. If it is set to 0 or not set at all, the connection will be renewed before every operation performed to the database.

For example, a good value to assign to this parameter, in MySQL, is the value of the MySQL system variable wait_timeout.


All versions of renew-doctrine-connection with dependencies

PHP Build Version
Package Version
Requires doctrine/dbal Version ^2.5
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 jdomenechb/renew-doctrine-connection contains the following files

Loading the files please wait ....