Skip to content

Commit

Permalink
[doctrineGH-4119] Add deprecation to Connection::ping.
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed Mar 7, 2021
1 parent 68cb9e6 commit a5c2152
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Doctrine/DBAL/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -2142,6 +2142,12 @@ public function createQueryBuilder()
*/
public function ping()
{
Deprecation::trigger(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/4119',
'Retry and reconnnecting lost connections now happens automatically, ping() will be removed in DBAL 3.'
);

$connection = $this->getWrappedConnection();

if ($connection instanceof PingableConnection) {
Expand Down

0 comments on commit a5c2152

Please sign in to comment.