From 286eeb618a4209d18d89e180d2eed0167fbd06f7 Mon Sep 17 00:00:00 2001 From: Lexidor Digital <31805625+lexidor@users.noreply.github.com> Date: Thu, 25 Feb 2021 01:39:37 +0100 Subject: [PATCH] Update connect signature newer hhvm version support (#66) * Update connect signature Required for hhvm (4.81 or 4.82?) and above https://github.com/facebook/hhvm/commit/b2b98065cbe297479e19d02fef6404e1a3b61722 * Remove lint silencers They were added by me ages ago. --- .hhconfig | 2 +- src/AsyncMysql/AsyncMysqlClient.php | 3 +-- src/AsyncMysql/AsyncMysqlConnection.php | 6 ++---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.hhconfig b/.hhconfig index c8ccb2d..2fe8887 100644 --- a/.hhconfig +++ b/.hhconfig @@ -1,4 +1,4 @@ hackfmt.line_width=120 assume_php=false allowed_decl_fixme_codes=2053,3012,4045,4047 -allowed_fixme_codes_strict=2011,2049,2050,2053,2083,3012,3084,4027,4045,4047,4104,4106,4107,4108,4110,4128,4135,4188,4223,4240,4323 +allowed_fixme_codes_strict=2011,2049,2050,2053,2083,3012,3084,4027,4045,4047,4104,4106,4107,4108,4110,4128,4135,4188,4223,4240,4323,4341,4390,4401 diff --git a/src/AsyncMysql/AsyncMysqlClient.php b/src/AsyncMysql/AsyncMysqlClient.php index 4de8027..580d140 100644 --- a/src/AsyncMysql/AsyncMysqlClient.php +++ b/src/AsyncMysql/AsyncMysqlClient.php @@ -4,8 +4,6 @@ use namespace HH\Lib\Vec; -/* HHAST_IGNORE_ALL[UnusedParameter] */ - <<__MockClass>> final class AsyncMysqlClient extends \AsyncMysqlClient { @@ -25,6 +23,7 @@ public static function setPoolsConnectionLimit(int $_limit): void {} int $_timeout_micros = -1, ?\MySSLContextProvider $_ssl_provider = null, int $_tcp_timeout_micros = 0, + string $_sni_server_name = '', ): Awaitable<\AsyncMysqlConnection> { return new AsyncMysqlConnection($host, $port, $dbname); } diff --git a/src/AsyncMysql/AsyncMysqlConnection.php b/src/AsyncMysql/AsyncMysqlConnection.php index 3a0ce9d..93f6d76 100644 --- a/src/AsyncMysql/AsyncMysqlConnection.php +++ b/src/AsyncMysql/AsyncMysqlConnection.php @@ -4,8 +4,6 @@ use namespace HH\Lib\Vec; -/* HHAST_IGNORE_ALL[UnusedParameter] */ - <<__MockClass>> final class AsyncMysqlConnection extends \AsyncMysqlConnection { @@ -39,8 +37,8 @@ public function __construct(private string $host, private int $port, private str <<__Override>> public async function query( string $query, - int $timeout_micros = -1, - dict $query_attributes = dict[], + int $_timeout_micros = -1, + dict $_query_attributes = dict[], ): Awaitable { Logger::log(Verbosity::QUERIES, "SQLFake [verbose]: $query");