From 3643ff745cd2e4d35afbb16acdc2837ae703fdb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Thu, 2 May 2024 14:06:07 +0200 Subject: [PATCH 1/2] redis: add possible types for `Redis#auth` method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- stubs/extensions/redis.phpstub | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stubs/extensions/redis.phpstub b/stubs/extensions/redis.phpstub index d14673868cf..27f28f45011 100644 --- a/stubs/extensions/redis.phpstub +++ b/stubs/extensions/redis.phpstub @@ -36,7 +36,8 @@ class Redis { /** @return false|int|Redis */ public function append(string $key, string $value) {} - public function auth(mixed $credentials): bool {} + /** @param array{string,string}|array{string}|string $credentials */ + public function auth(#[\SensitiveParameter] mixed $credentials): bool {} public function bgSave(): bool {} From 5ff68d60677b5b8a144ee4708e07d866fd212166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Sun, 5 May 2024 15:32:51 +0200 Subject: [PATCH 2/2] qa: remove `SensitiveParameter` from `Redis##auth` stub MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I was expecting that it might have a benefit regarding tentative types but it seems that psalm does not use that and thus was suggested to be removed. Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- stubs/extensions/redis.phpstub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/extensions/redis.phpstub b/stubs/extensions/redis.phpstub index 27f28f45011..97fd397b2dd 100644 --- a/stubs/extensions/redis.phpstub +++ b/stubs/extensions/redis.phpstub @@ -37,7 +37,7 @@ class Redis { public function append(string $key, string $value) {} /** @param array{string,string}|array{string}|string $credentials */ - public function auth(#[\SensitiveParameter] mixed $credentials): bool {} + public function auth(mixed $credentials): bool {} public function bgSave(): bool {}