[Messenger] Fix DBAL deprecations in PostgreSQLConnection
This commit is contained in:
parent
8c81f33840
commit
bc42cf604e
@ -372,7 +372,7 @@ class Connection implements ResetInterface
|
||||
return $stmt;
|
||||
}
|
||||
|
||||
private function executeStatement(string $sql, array $parameters = [], array $types = [])
|
||||
protected function executeStatement(string $sql, array $parameters = [], array $types = [])
|
||||
{
|
||||
try {
|
||||
if (method_exists($this->driverConnection, 'executeStatement')) {
|
||||
|
@ -64,7 +64,7 @@ final class PostgreSqlConnection extends Connection
|
||||
if (!$this->listening) {
|
||||
// This is secure because the table name must be a valid identifier:
|
||||
// https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
|
||||
$this->driverConnection->exec(sprintf('LISTEN "%s"', $this->configuration['table_name']));
|
||||
$this->executeStatement(sprintf('LISTEN "%s"', $this->configuration['table_name']));
|
||||
$this->listening = true;
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ final class PostgreSqlConnection extends Connection
|
||||
{
|
||||
parent::setup();
|
||||
|
||||
$this->driverConnection->exec(implode("\n", $this->getTriggerSql()));
|
||||
$this->executeStatement(implode("\n", $this->getTriggerSql()));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -134,7 +134,7 @@ SQL
|
||||
return;
|
||||
}
|
||||
|
||||
$this->driverConnection->exec(sprintf('UNLISTEN "%s"', $this->configuration['table_name']));
|
||||
$this->executeStatement(sprintf('UNLISTEN "%s"', $this->configuration['table_name']));
|
||||
$this->listening = false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user