Releases: facile-it/doctrine-mysql-come-back
Releases · facile-it/doctrine-mysql-come-back
3.0.3
2.1.0
- Bump minimum PHP version to 8.1
- Intercept new timeout message in MySQL 8.0.24+ under PHP 8.4+ (thanks @ackermannd)
- Test against PHP 8.5
2.0.2
3.0.2
2.0.1
3.0.1
3.0.0
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.
Added
- Support DBAL 4
Removed
- Drop support for DBAL 3
New Contributors
- @oleg-andreyev made their first contribution in #84
Full Changelog: 2.0.0...3.0.0
2.0.0
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:
Added
- Support DBAL v3.6+
- Add
GoneAwayDetectorinterface andMySQLGoneAwayDetectorclass implementation - Add
setGoneAwayDetectormethod to the connections - Add handling of AWS MySQL RDS connection loss
- Add validation to
x_reconnect_attempts - Add mutation testing with Infection
Changed
- Change
Connectionmethod 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
// ...
}- Change
Statementconstructor 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
// ...
}Fixed
- In
PrimaryReadReplicaConnection, fetchdriverOptionsfrom under theprimarykey
Removed
- Drop support for DBAL v2
- Drop support for PHP 7.3
- Removed
Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Connections\MasterSlaveConnectionclass - Removed
Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\ServerGoneAwayExceptionsAwareInterfaceinterface - Removed
Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\ServerGoneAwayExceptionsAwareTraittrait - Removed
Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\Mysqli\Driverclass - Removed
Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\PDOMySQL\Driverclass - Removed
Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\PDO\MySQL\Driverclass - Removed
Connection::query()method (due to drop in DBAL v3) - Removed
Connection::refresh()method (due to drop in DBAL v3) - Removed
Connection::isUpdateQuery()method (logic is now behind theGoneAwayDetectorinterface) - Removed
Statement::bindValue()method - Removed
Statement::bindParam()method - Removed
Statement::execute()method - Removed
Statement::setFetchMode()method
2.0.0-BETA4
Added
- Centralize reconnect attempts counter
- Add
Statement::fromDBALStatementfor simpler creation - Add mutation testing with Infection
Fixed
- Avoid reconnection attempts if a transaction was opened (and not closed) before the "gone away" error
- Avoid retrying
SAVEPOINTstatements - Handle
Statement::bindParamandStatement::bindValuecorrectly on reconnection
Changed
- Refactor
Connectionretry logic into a single method - Make
Statement::__constructprivate
2.0.0-BETA3
Added
- Add validation to
x_reconnect_attempts
Fixed
- In
PrimaryReadReplicaConnection, fetchdriverOptionsfrom under theprimarykey