From d8c7ee8308d90b8a90c70db8478cfd59011d074d Mon Sep 17 00:00:00 2001 From: zxin Date: Sun, 14 Nov 2021 13:43:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=20php=208.1=20=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E9=97=AE=E9=A2=98=20(#206)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Db/Drivers/Swoole/Statement.php | 3 +++ tests/config/config.php | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Db/Drivers/Swoole/Statement.php b/src/Db/Drivers/Swoole/Statement.php index 81159aa..795a7fa 100644 --- a/src/Db/Drivers/Swoole/Statement.php +++ b/src/Db/Drivers/Swoole/Statement.php @@ -335,6 +335,7 @@ public function getInstance() /** * @return mixed|false */ + #[\ReturnTypeWillChange] public function current() { return current($this->result); @@ -343,6 +344,7 @@ public function current() /** * @return int|string|null */ + #[\ReturnTypeWillChange] public function key() { return key($this->result); @@ -367,6 +369,7 @@ public function rewind(): void /** * {@inheritDoc} */ + #[\ReturnTypeWillChange] public function valid() { return false !== $this->current(); diff --git a/tests/config/config.php b/tests/config/config.php index 36b7c59..e4586bb 100644 --- a/tests/config/config.php +++ b/tests/config/config.php @@ -62,7 +62,7 @@ 'resource' => [ 'dbClass' => 'PdoPgsqlDriver', 'host' => imiGetEnv('PGSQL_SERVER_HOST', '127.0.0.1'), - 'port' => imiGetEnv('PGSQL_SERVER_PORT', 5432), + 'port' => (int) imiGetEnv('PGSQL_SERVER_PORT', 5432), 'username' => imiGetEnv('PGSQL_SERVER_USERNAME', 'root'), 'password' => imiGetEnv('PGSQL_SERVER_PASSWORD', 'root'), 'database' => 'db_imi_test', @@ -84,7 +84,7 @@ 'resource' => [ 'dbClass' => 'PdoPgsqlDriver', 'host' => imiGetEnv('PGSQL_SERVER_HOST', '127.0.0.1'), - 'port' => imiGetEnv('PGSQL_SERVER_PORT', 5432), + 'port' => (int) imiGetEnv('PGSQL_SERVER_PORT', 5432), 'username' => imiGetEnv('PGSQL_SERVER_USERNAME', 'root'), 'password' => imiGetEnv('PGSQL_SERVER_PASSWORD', 'root'), 'database' => 'db_imi_test', @@ -105,7 +105,7 @@ 'resource' => [ 'dbClass' => 'SwoolePgsqlDriver', 'host' => imiGetEnv('PGSQL_SERVER_HOST', '127.0.0.1'), - 'port' => imiGetEnv('PGSQL_SERVER_PORT', 5432), + 'port' => (int) imiGetEnv('PGSQL_SERVER_PORT', 5432), 'username' => imiGetEnv('PGSQL_SERVER_USERNAME', 'root'), 'password' => imiGetEnv('PGSQL_SERVER_PASSWORD', 'root'), 'database' => 'db_imi_test', @@ -120,7 +120,7 @@ 'maindb' => [ 'dbClass' => 'PdoPgsqlDriver', 'host' => imiGetEnv('PGSQL_SERVER_HOST', '127.0.0.1'), - 'port' => imiGetEnv('PGSQL_SERVER_PORT', 5432), + 'port' => (int) imiGetEnv('PGSQL_SERVER_PORT', 5432), 'username' => imiGetEnv('PGSQL_SERVER_USERNAME', 'root'), 'password' => imiGetEnv('PGSQL_SERVER_PASSWORD', 'root'), 'database' => 'db_imi_test',