Skip to content

Releases: facile-it/doctrine-mysql-come-back

3.0.0

10 Mar 11:33
3.0.0
d2f6c51
Compare
Choose a tag to compare

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

Full Changelog: 2.0.0...3.0.0

2.0.0

08 Jun 12:03
2.0.0
336b267
Compare
Choose a tag to compare

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 GoneAwayDetector interface and MySQLGoneAwayDetector class implementation
  • Add setGoneAwayDetector method to the connections
  • Add handling of AWS MySQL RDS connection loss
  • Add validation to x_reconnect_attempts
  • Add mutation testing with Infection

Changed

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 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
// ...
}

Fixed

  • In PrimaryReadReplicaConnection, fetch driverOptions from under the primary key

Removed

  • Drop support for DBAL v2
  • Drop support for PHP 7.3
  • Removed Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Connections\MasterSlaveConnection class
  • Removed Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\ServerGoneAwayExceptionsAwareInterface interface
  • Removed Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\ServerGoneAwayExceptionsAwareTrait trait
  • Removed Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\Mysqli\Driver class
  • Removed Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\PDOMySQL\Driver class
  • Removed Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\PDO\MySQL\Driver class
  • 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 the GoneAwayDetector interface)
  • Removed Statement::bindValue() method
  • Removed Statement::bindParam() method
  • Removed Statement::execute() method
  • Removed Statement::setFetchMode() method

2.0.0-BETA4

05 Apr 15:31
2.0.0-BETA4
f0114b6
Compare
Choose a tag to compare
2.0.0-BETA4 Pre-release
Pre-release

Added

  • Centralize reconnect attempts counter
  • Add Statement::fromDBALStatement for 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 SAVEPOINT statements
  • Handle Statement::bindParam and Statement::bindValue correctly on reconnection

Changed

  • Refactor Connection retry logic into a single method
  • Make Statement::__construct private

2.0.0-BETA3

01 Apr 22:51
2.0.0-BETA3
0103925
Compare
Choose a tag to compare
2.0.0-BETA3 Pre-release
Pre-release

Added

  • Add validation to x_reconnect_attempts

Fixed

  • In PrimaryReadReplicaConnection, fetch driverOptions from under the primary key

2.0.0-BETA2

01 Apr 21:33
2.0.0-BETA2
1cd86f9
Compare
Choose a tag to compare
2.0.0-BETA2 Pre-release
Pre-release

Added

  • Added PrimaryReadReplicaConnection and ConnectionTrait back
  • Added handling of AWS MySQL RDS connection loss

Fixed

  • Fixed beginTransaction function to have reconnection support

Removed

  • Drop support for DBAL < 3.6
  • Drop support for PHP 7.3

2.0.0-BETA1

23 Jun 07:24
2.0.0-BETA1
656bd45
Compare
Choose a tag to compare
2.0.0-BETA1 Pre-release
Pre-release

This is a new major version. Refer to the UPGRADE-2.0.md for guidance during the upgrade.

Added

  • Support DBAL v3
  • Add GoneAwayDetector interface and MySQLGoneAwayDetector class implementation

Changed

  • Changed Connection constructor and method signatures to follow DBAL v3 changes

Removed

  • Drop support for DBAL v2
  • Removed Driver classes
  • Removed ConnectionTrait, now everything is inside Connection
  • Removed Connection::refresh() method (due to drop in DBAL v3)
  • Removed Connection::isUpdateQuery() method (logic is now behind the GoneAwayDetector interface)
  • Removed specialized MasterSlaveConnection and PrimaryReadReplicaConnection (due to drop of corresponding classes in DBAL v3)

1.10.1

23 Apr 12:31
ff4a854
Compare
Choose a tag to compare

Hotfix

  • Resolved PrimaryReadReplicaConnection compatibility (#48, #49)

1.10.0

25 Mar 16:19
1.10.0
4975363
Compare
Choose a tag to compare

Added

  • Added PHP 8 support
  • Added compatibility with doctrine/dbal > 2.11 Statement
  • Added ability to reconnect when creating Mysqli statement

Changed

  • Statement now extends the original one, so all methods are implemented now
  • Connection::refresh() is deprecated, you should use the original Connection::ping()

[1.10.0-beta1] - 2021-01-07

07 Jan 16:46
660ac11
Compare
Choose a tag to compare
Pre-release

Added

  • Added compatibility with doctrine/dbal > 2.11 Statement
  • Added ability to reconnect when creating Mysqli statement

Changed

  • Statement now extends the original one, so all methods are implemented now
  • Connection::refresh() is deprecated, you should use the original Connection::ping()

[1.9.0] - 2020-11-02

02 Nov 15:56
086d205
Compare
Choose a tag to compare

Added

  • Added compatibility with doctrine/dbal 2.11
  • Added Github Actions for CI

Changed

  • Bumped minimum PHP version to 7.3
  • Updated dependencies
  • Added functional tests

Fixed

  • Fixed compatiblity with doctrine/dbal 2.11