Skip to content

Commit ce8e5b7

Browse files
committed
bug #46610 [Messenger] use the outermost wrapping DBAL connection (xabbuh)
This PR was merged into the 5.4 branch. Discussion ---------- [Messenger] use the outermost wrapping DBAL connection | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #46436 | License | MIT | Doc PR | Commits ------- 4178244 use the outermost wrapping DBAL connection
2 parents 2cbbec4 + 4178244 commit ce8e5b7

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy