File tree 1 file changed +7
-1
lines changed
src/Symfony/Component/Messenger/Bridge/Doctrine/Transport
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Messenger \Bridge \Doctrine \Transport ;
13
13
14
+ use Doctrine \DBAL \Driver \PDO \Connection as DoctrinePdoConnection ;
14
15
use Doctrine \DBAL \Schema \Table ;
15
16
16
17
/**
@@ -72,7 +73,12 @@ public function get(): ?array
72
73
$ this ->listening = true ;
73
74
}
74
75
75
- $ notification = $ this ->driverConnection ->getWrappedConnection ()->pgsqlGetNotify (\PDO ::FETCH_ASSOC , $ this ->configuration ['get_notify_timeout ' ]);
76
+ $ wrappedConnection = $ this ->driverConnection ->getWrappedConnection ();
77
+ if (!$ wrappedConnection instanceof \PDO && $ wrappedConnection instanceof DoctrinePdoConnection) {
78
+ $ wrappedConnection = $ wrappedConnection ->getWrappedConnection ();
79
+ }
80
+
81
+ $ notification = $ wrappedConnection ->pgsqlGetNotify (\PDO ::FETCH_ASSOC , $ this ->configuration ['get_notify_timeout ' ]);
76
82
if (
77
83
// no notifications, or for another table or queue
78
84
(false === $ notification || $ notification ['message ' ] !== $ this ->configuration ['table_name ' ] || $ notification ['payload ' ] !== $ this ->configuration ['queue_name ' ]) &&
You can’t perform that action at this time.
0 commit comments