NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #2831 most downloaded on Packagist
Auto reconnect on Doctrine MySql has gone away exceptions on doctrine/dbal
Last release 1 years ago
02 Sep 2025
Release timing varies
gaps range from 4 weeks to 1.2 years
Some releases are documented
notes for 15 of 26 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
31 releases · first in 2014
Intercept new timeout message in MySQL 8.0.24+ under PHP 8.4+ (thanks @ackermannd )
Resolve PHP 8.4 deprecation
One column per quarter.
Fixed beginTransaction reconnection behavior with MySQLi and DBAL 4.2.3+
beginTransaction reconnection behavior with MySQLi and DBAL 4.2.3+This new major version is identical to the previous one; the only changes are the ones needed to maintain compatibility with the new DBAL major, so ma
This new major version is identical to the previous one; the only changes are the ones needed to maintain compatibility with the new DBAL major, so mainly signature changes.
Full Changelog: 2.0.0...3.0.0
Bump minimum PHP version to 8.1
Resolve PHP 8.4 deprecation (fix 2.0.1 tag)
Resolve PHP 8.4 deprecation
This is the final, stable release of the new version of this library, supporting DBAL 3.6+; unfortunately, DBAL 3.0 to 3.5 is unsupported (but upgradi
This is the final, stable release of the new version of this library, supporting DBAL 3.6+; unfortunately, DBAL 3.0 to 3.5 is unsupported (but upgrading to 3.6 should not be an issue).
If you're upgrading from a 1.x version, please refer to the UPGRADE-2.0.md document.
The version has no changes from 2.0.0-BETA4; the following is the detailed changelog from the 1.x series:
GoneAwayDetector interface and MySQLGoneAwayDetector class implementationsetGoneAwayDetector method to the connectionsx_reconnect_attemptsConnection method signatures to follow DBAL v3 changes:namespace Facile\DoctrineMySQLComeBack\Doctrine\DBAL;
use Doctrine\DBAL\Cache\QueryCacheProfile;
use Doctrine\DBAL\Connection as DBALConnection;
+use Doctrine\DBAL\Result;
class Connection extends DBALConnection
{
// ...
- public function prepare($sql)
+ public function prepare(string $sql): DBALStatement
// ...
- public function executeQuery($query, array $params = array(), $types = array(), QueryCacheProfile $qcp = null)
+ public function executeQuery(string $sql, array $params = [], $types = [], ?QueryCacheProfile $qcp = null): Result
// ...
}Statement constructor and method signatures to follow DBAL v3 changes:namespace Facile\DoctrineMySQLComeBack\Doctrine\DBAL;
use Doctrine\DBAL\Cache\QueryCacheProfile;
use Doctrine\DBAL\Connection as DBALConnection;
+use Doctrine\DBAL\Result;
class Statement extends \Doctrine\DBAL\Statement
{
// ...
- public function __construct($sql, ConnectionInterface $conn)
+ public function __construct(Connection $retriableConnection, Driver\Statement $statement, string $sql)
// ...
- public function executeQuery($query, array $params = array(), $types = array(), QueryCacheProfile $qcp = null)
+ public function executeQuery(string $sql, array $params = [], $types = [], ?QueryCacheProfile $qcp = null): Result
// ...
}PrimaryReadReplicaConnection, fetch driverOptions from under the primary keyFacile\DoctrineMySQLComeBack\Doctrine\DBAL\Connections\MasterSlaveConnection classFacile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\ServerGoneAwayExceptionsAwareInterface interfaceFacile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\ServerGoneAwayExceptionsAwareTrait traitFacile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\Mysqli\Driver classFacile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\PDOMySQL\Driver classFacile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\PDO\MySQL\Driver classConnection::query() method (due to drop in DBAL v3)Connection::refresh() method (due to drop in DBAL v3)Connection::isUpdateQuery() method (logic is now behind the GoneAwayDetector interface)Statement::bindValue() methodStatement::bindParam() methodStatement::execute() methodStatement::setFetchMode() methodCentralize reconnect attempts counter
Statement::fromDBALStatement for simpler creationSAVEPOINT statementsStatement::bindParam and Statement::bindValue correctly on reconnectionConnection retry logic into a single methodStatement::__construct privateAdd validation to x_reconnect_attempts
x_reconnect_attemptsPrimaryReadReplicaConnection, fetch driverOptions from under the primary keyAdded PrimaryReadReplicaConnection and ConnectionTrait back
PrimaryReadReplicaConnection and ConnectionTrait backbeginTransaction function to have reconnection supportAdd GoneAwayDetector interface and MySQLGoneAwayDetector class implementation
GoneAwayDetector interface and MySQLGoneAwayDetector class implementationConnection constructor and method signatures to follow DBAL v3 changesConnectionTrait, now everything is inside ConnectionConnection::refresh() method (due to drop in DBAL v3)Connection::isUpdateQuery() method (logic is now behind the GoneAwayDetector interface)MasterSlaveConnection and PrimaryReadReplicaConnection (due to drop of corresponding classes in DBAL v3)Nothing published for this version
Connection::refresh() is deprecated, you should use the original Connection::ping()
Mysqli statementStatement now extends the original one, so all methods are implemented nowConnection::refresh() is deprecated, you should use the original Connection::ping()Nothing published for this version
Added compatibility with doctrine/dbal 2.11
Changed the version constraint of doctrine/dbal to ^2.3 to allow v2.7
doctrine/dbal to ^2.3 to allow v2.7 (#26)Compatibility with doctrine/dbal up to version 2.6
Fix issue for not retrying a query that has a new line after the SELECT keyword
SELECT keyword (#19)UPDATE queries to avoid issues (#17)Added a configuration example for ZendFramework
Driver::connect() (#14)Refactor and eliminate duplication using a trait
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →