8000 [Messenger] Leverage DBAL's getNativeConnection() method by derrabus · Pull Request #44309 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Messenger] Leverage DBAL's getNativeConnection() method #44309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Leverage DBAL's getNativeConnection() method
  • Loading branch information
derrabus committed Nov 27, 2021
commit cde5ec7b5f27732b701cbd0f4e892734fd598eea
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,13 @@ public function get(): ?array
$this->listening = true;
}

$wrappedConnection = $this->driverConnection->getWrappedConnection();
if (!$wrappedConnection instanceof \PDO && $wrappedConnection instanceof DoctrinePdoConnection) {
$wrappedConnection = $wrappedConnection->getWrappedConnection();
if (method_exists($this->driverConnection, 'getNativeConnection')) {
$wrappedConnection = $this->driverConnection->getNativeConnection();
} else {
$wrappedConnection = $this->driverConnection->getWrappedConnection();
if (!$wrappedConnection instanceof \PDO && $wrappedConnection instanceof DoctrinePdoConnection) {
$wrappedConnection = $wrappedConnection->getWrappedConnection();
}
}

$notification = $wrappedConnection->pgsqlGetNotify(\PDO::FETCH_ASSOC, $this->configuration['get_notify_timeout']);
Expand Down
0