From da3bd318ff30a1d5476890688209455f7280952a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Wed, 10 Apr 2024 22:44:16 +0200 Subject: [PATCH] move psalm validation error suppression for the RedisCluster constructor to the code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: robin-brabants Co-authored-by: robin-brabants Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- psalm.xml | 9 --------- src/RedisClusterResourceManager.php | 12 ++++++++++++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/psalm.xml b/psalm.xml index d34a358..dfc0477 100644 --- a/psalm.xml +++ b/psalm.xml @@ -50,15 +50,6 @@ - - - - - - diff --git a/src/RedisClusterResourceManager.php b/src/RedisClusterResourceManager.php index 6691cae..382a498 100644 --- a/src/RedisClusterResourceManager.php +++ b/src/RedisClusterResourceManager.php @@ -91,6 +91,12 @@ private function createRedisResource(RedisClusterOptions $options): RedisCluster $password = null; } + /** + * Psalm currently (<= 5.23.1) uses an outdated (phpredis < 5.3.2) constructor signature for the RedisCluster + * class in the phpredis extension. + * + * @psalm-suppress TooManyArguments https://github.com/vimeo/psalm/pull/10862 + */ return new RedisClusterFromExtension( null, $options->getSeeds(), @@ -119,6 +125,12 @@ private function createRedisResourceFromName( $readTimeout = $options->getReadTimeout($name, $fallbackReadTimeout); $password = $options->getPasswordByName($name, $fallbackPassword); + /** + * Psalm currently (<= 5.23.1) uses an outdated (phpredis < 5.3.2) constructor signature for the RedisCluster + * class in the phpredis extension. + * + * @psalm-suppress TooManyArguments https://github.com/vimeo/psalm/pull/10862 + */ return new RedisClusterFromExtension( null, $seeds,