Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4178244

Browse files
committed
use the outermost wrapping DBAL connection
1 parent 2cbbec4 commit 4178244

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/PostgreSqlConnection.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Messenger\Bridge\Doctrine\Transport;
1313

14-
use Doctrine\DBAL\Driver\PDO\Connection as DoctrinePdoConnection;
1514
use Doctrine\DBAL\Schema\Table;
1615

1716
/**
@@ -73,8 +72,8 @@ public function get(): ?array
7372
if (method_exists($this->driverConnection, 'getNativeConnection')) {
7473
$wrappedConnection = $this->driverConnection->getNativeConnection();
7574
} else {
76-
$wrappedConnection = $this->driverConnection->getWrappedConnection();
77-
if (!$wrappedConnection instanceof \PDO && $wrappedConnection instanceof DoctrinePdoConnection) {
75+
$wrappedConnection = $this->driverConnection;
76+
while (method_exists($wrappedConnection, 'getWrappedConnection')) {
7877
$wrappedConnection = $wrappedConnection->getWrappedConnection();
7978
}
8079
}

0 commit comments

Comments
 (0)