NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #2699 most downloaded on Packagist
Auto reconnect on Doctrine MySql has gone away exceptions on doctrine/dbal
Latest stable
3.0.3
Last release 1 years ago
02 Sep 2025
Release timing varies
gaps range from 4 weeks to 1.2 years
Most releases are documented
notes for 18 of 26 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
31 releases · first in 2014
Drag across the ruler to compare, or tap a release to open it.
Intercept new timeout message in MySQL 8.0.24+ under PHP 8.4+ (thanks @ackermannd)
Resolve PHP 8.4 deprecation
Fixed beginTransaction reconnection behavior with MySQLi and DBAL 4.2.3+
beginTransaction reconnection behavior with MySQLi and DBAL 4.2.3+Your coding agent can read these notes before it upgrades. Set up the MCP server →
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: https://github.com/facile-it/doctrine-mysql-come-back/compare/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 supportThis is a new major version. Refer to the UPGRADE-2.0.md for guidance during the upgrade.
This is a new major version. Refer to the UPGRADE-2.0.md for guidance during the upgrade.
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)Resolved PrimaryReadReplicaConnection compatibility (#48, #49)
PrimaryReadReplicaConnection compatibility (#48, #49)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()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()Added compatibility with doctrine/dbal 2.11
Changed the version constraint o doctrine/dbal to ^2.3 to allow v2.7
doctrine/dbal to ^2.3 to allow v2.7 (#26)doctrine/dbal to ^2.3 to allow v2.7 (#26)Compatibility with doctrine/dbal up to version 2.6
Changed PHP requirement with upper bound 7.0
ServerGoneAwayExceptionsAwareInterface splitting select and updates exceptionsLost connection to MySQL server during query error.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
Fixed issue about loss of state for Statement class on retry
Compatibility with doctrine/dbal up to version 2.9
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
One column per quarter.