8000 minor #53556 [Cache] fix Redis proxies tests (xabbuh) · symfony/symfony@18fddd5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 18fddd5

Browse files
committed
minor #53556 [Cache] fix Redis proxies tests (xabbuh)
This PR was merged into the 6.3 branch. Discussion ---------- [Cache] fix Redis proxies tests | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | phpredis/phpredis#2423, phpredis/phpredis#2434 | License | MIT Commits ------- 669741a fix Redis proxies tests
2 parents aa232c4 + 669741a commit 18fddd5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/Symfony/Component/Cache/Tests/Traits/RedisProxiesTest.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,17 @@ public function testRedis6Proxy($class, $stub)
102102
continue;
103103
}
104104
$return = $method->getReturnType() instanceof \ReflectionNamedType && 'void' === (string) $method->getReturnType() ? '' : 'return ';
105-
$methods[] = "\n ".str_replace('timeout = 0.0', 'timeout = 0', ProxyHelper::exportSignature($method, false, $args))."\n".<<<EOPHP
105+
$signature = ProxyHelper::exportSignature($method, false, $args);
106+
107+
if ('Redis' === $class && 'mget' === $method->name) {
108+
$signature = str_replace(': \Redis|array|false', ': \Redis|array', $signature);
109+
}
110+
111+
if ('RedisCluster' === $class && 'publish' === $method->name) {
112+
$signature = str_replace(': \RedisCluster|bool|int', ': \RedisCluster|bool', $signature);
113+
}
114+
115+
$methods[] = "\n ".str_replace('timeout = 0.0', 'timeout = 0', $signature)."\n".<<<EOPHP
106116
{
107117
{$return}(\$this->lazyObjectState->realInstance ??= (\$this->lazyObjectState->initializer)())->{$method->name}({$args});
108118
}

0 commit comments

Comments
 (0)
0