Skip to content

Commit 336b267

Browse files
committed
Prepare 2.0 stable release
1 parent f0114b6 commit 336b267

File tree

4 files changed

+86
-4
lines changed

4 files changed

+86
-4
lines changed

CHANGELOG.md

+76
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,82 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
88
## [Unreleased]
99
* ...
1010

11+
## [2.0.0] - 2023-06-08
12+
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).
13+
14+
If you're upgrading from a 1.x version, please refer to the [UPGRADE-2.0.md](./UPGRADE-2.0.md) document.
15+
16+
The version has no changes from 2.0.0-BETA4; the following is the detailed changelog from the 1.x series:
17+
18+
### Added
19+
* Support DBAL v3.6+
20+
* Add `GoneAwayDetector` interface and `MySQLGoneAwayDetector` class implementation
21+
* Add `setGoneAwayDetector` method to the connections
22+
* Add handling of AWS MySQL RDS connection loss
23+
* Add validation to `x_reconnect_attempts`
24+
* Add mutation testing with Infection
25+
26+
### Changed
27+
* Change `Connection` method signatures to follow [DBAL v3 changes](https://github.com/doctrine/dbal/blob/3.3.x/UPGRADE.md#upgrade-to-30):
28+
29+
```diff
30+
namespace Facile\DoctrineMySQLComeBack\Doctrine\DBAL;
31+
32+
use Doctrine\DBAL\Cache\QueryCacheProfile;
33+
use Doctrine\DBAL\Connection as DBALConnection;
34+
+use Doctrine\DBAL\Result;
35+
36+
class Connection extends DBALConnection
37+
{
38+
// ...
39+
- public function prepare($sql)
40+
+ public function prepare(string $sql): DBALStatement
41+
// ...
42+
- public function executeQuery($query, array $params = array(), $types = array(), QueryCacheProfile $qcp = null)
43+
+ public function executeQuery(string $sql, array $params = [], $types = [], ?QueryCacheProfile $qcp = null): Result
44+
// ...
45+
}
46+
```
47+
* Change `Statement` constructor and method signatures to follow [DBAL v3 changes](https://github.com/doctrine/dbal/blob/3.3.x/UPGRADE.md#upgrade-to-30):
48+
```diff
49+
namespace Facile\DoctrineMySQLComeBack\Doctrine\DBAL;
50+
51+
use Doctrine\DBAL\Cache\QueryCacheProfile;
52+
use Doctrine\DBAL\Connection as DBALConnection;
53+
+use Doctrine\DBAL\Result;
54+
55+
class Statement extends \Doctrine\DBAL\Statement
56+
{
57+
// ...
58+
- public function __construct($sql, ConnectionInterface $conn)
59+
+ public function __construct(Connection $retriableConnection, Driver\Statement $statement, string $sql)
60+
// ...
61+
- public function executeQuery($query, array $params = array(), $types = array(), QueryCacheProfile $qcp = null)
62+
+ public function executeQuery(string $sql, array $params = [], $types = [], ?QueryCacheProfile $qcp = null): Result
63+
// ...
64+
}
65+
```
66+
67+
### Fixed
68+
* In `PrimaryReadReplicaConnection`, fetch `driverOptions` from under the `primary` key
69+
70+
### Removed
71+
* Drop support for DBAL v2
72+
* Drop support for PHP 7.3
73+
* Removed `Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Connections\MasterSlaveConnection` class
74+
* Removed `Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\ServerGoneAwayExceptionsAwareInterface` interface
75+
* Removed `Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\ServerGoneAwayExceptionsAwareTrait` trait
76+
* Removed `Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\Mysqli\Driver` class
77+
* Removed `Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\PDOMySQL\Driver` class
78+
* Removed `Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\PDO\MySQL\Driver` class
79+
* Removed `Connection::query()` method (due to drop in DBAL v3)
80+
* Removed `Connection::refresh()` method (due to drop in DBAL v3)
81+
* Removed `Connection::isUpdateQuery()` method (logic is now behind the `GoneAwayDetector` interface)
82+
* Removed `Statement::bindValue()` method
83+
* Removed `Statement::bindParam()` method
84+
* Removed `Statement::execute()` method
85+
* Removed `Statement::setFetchMode()` method
86+
1187
## [2.0.0-BETA4] - 2023-04-05
1288
### Added
1389
* Centralize reconnect attempts counter

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Auto reconnect on Doctrine MySql has gone away exceptions on `doctrine/dbal`.
1212

1313
# Installation
1414

15-
If you're using DBAL 3
15+
If you're using DBAL 3.6+
1616
```console
1717
$ composer require facile-it/doctrine-mysql-come-back ^2.0
1818
```

UPGRADE-2.0.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ If you were instead extending the code inside this library, you should proceed w
1313
* Support DBAL v3.6+
1414
* Add `GoneAwayDetector` interface and `MySQLGoneAwayDetector` class implementation
1515
* Add `setGoneAwayDetector` method to the connections
16-
* Added handling of AWS MySQL RDS connection loss
16+
* Add handling of AWS MySQL RDS connection loss
1717
* Add validation to `x_reconnect_attempts`
18+
* Add mutation testing with Infection
1819

1920
### Changed
20-
* Changed `Connection` method signatures to follow [DBAL v3 changes](https://github.com/doctrine/dbal/blob/3.3.x/UPGRADE.md#upgrade-to-30):
21+
* Change `Connection` method signatures to follow [DBAL v3 changes](https://github.com/doctrine/dbal/blob/3.3.x/UPGRADE.md#upgrade-to-30):
2122

2223
```diff
2324
namespace Facile\DoctrineMySQLComeBack\Doctrine\DBAL;
@@ -37,7 +38,7 @@ class Connection extends DBALConnection
3738
// ...
3839
}
3940
```
40-
* Changed `Statement` constructor and method signatures to follow [DBAL v3 changes](https://github.com/doctrine/dbal/blob/3.3.x/UPGRADE.md#upgrade-to-30):
41+
* Change `Statement` constructor and method signatures to follow [DBAL v3 changes](https://github.com/doctrine/dbal/blob/3.3.x/UPGRADE.md#upgrade-to-30):
4142
```diff
4243
namespace Facile\DoctrineMySQLComeBack\Doctrine\DBAL;
4344

@@ -62,6 +63,7 @@ class Statement extends \Doctrine\DBAL\Statement
6263

6364
### Removed
6465
* Drop support for DBAL v2
66+
* Drop support for PHP 7.3
6567
* Removed `Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Connections\MasterSlaveConnection` class
6668
* Removed `Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\ServerGoneAwayExceptionsAwareInterface` interface
6769
* Removed `Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Driver\ServerGoneAwayExceptionsAwareTrait` trait

composer.json

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
],
1313
"license": "Apache-2.0",
1414
"authors": [
15+
{
16+
"name": "Alessandro Lai",
17+
"email": "alessandro.lai85@gmail.com"
18+
},
1519
{
1620
"name": "Luca Bo",
1721
"email": "luca.boeri@facile.it"

0 commit comments

Comments
 (0)