Skip to content

Commit 5d336dd

Browse files
minor symfony#61072 [Cache] Bump ext-redis to 6.2 and ext-relay to 0.11 minimum (nicolas-grekas)
This PR was merged into the 7.4 branch. Discussion ---------- [Cache] Bump ext-redis to 6.2 and ext-relay to 0.11 minimum | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT ext-redis 5 isn't compatible with PHP 8.2 and ext-relay is kinda commercial so let's make our life simpler. Commits ------- 7484cdd [Cache] Bump ext-redis to 6.2 and ext-relay to 0.11 minimum
2 parents da5b2c7 + 7484cdd commit 5d336dd

24 files changed

+3857
-6048
lines changed

.github/workflows/windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ jobs:
4848
cd ext
4949
iwr -outf php_apcu-5.1.22-8.2-ts-vs16-x86.zip https://github.com/symfony/binary-utils/releases/download/v0.1/php_apcu-5.1.22-8.2-ts-vs16-x86.zip
5050
7z x php_apcu-5.1.22-8.2-ts-vs16-x86.zip -y >nul
51-
iwr -outf php_redis-6.0.0-dev-8.2-ts-vs16-x86.zip https://github.com/symfony/binary-utils/releases/download/v0.1/php_redis-6.0.0-dev-8.2-ts-vs16-x86.zip
52-
7z x php_redis-6.0.0-dev-8.2-ts-vs16-x86.zip -y >nul
51+
iwr -outf php_redis-6.2.0-8.2-ts-vs16-x86.zip https://github.com/symfony/binary-utils/releases/download/v0.1/php_redis-6.2.0-8.2-ts-vs16-x86.zip
52+
7z x php_redis-6.2.0-8.2-ts-vs16-x86.zip -y >nul
5353
cd ..
5454
Copy php.ini-development php.ini-min
5555
"memory_limit=-1" >> php.ini-min

UPGRADE-7.4.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ Read more about this in the [Symfony documentation](https://symfony.com/doc/7.4/
88

99
If you're upgrading from a version below 7.3, follow the [7.3 upgrade guide](UPGRADE-7.3.md) first.
1010

11+
Cache
12+
-----
13+
14+
* Bump ext-redis to 6.2 and ext-relay to 0.11 minimum
15+
1116
Console
1217
-------
1318

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@
168168
},
169169
"conflict": {
170170
"ext-psr": "<1.1|>=2",
171+
"ext-redis": "<6.2",
172+
"ext-relay": "<0.11",
171173
"amphp/amp": "<2.5",
172174
"async-aws/core": "<1.5",
173175
"doctrine/collections": "<1.8",

src/Symfony/Component/Cache/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
7.4
5+
---
6+
7+
* Bump ext-redis to 6.2 and ext-relay to 0.11 minimum
8+
49
7.3
510
---
611

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

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,17 @@ class RedisProxiesTest extends TestCase
2929
*/
3030
public function testRedisProxy($class)
3131
{
32-
$version = version_compare(phpversion('redis'), '6', '>') ? '6' : '5';
33-
$proxy = file_get_contents(\dirname(__DIR__, 2)."/Traits/{$class}{$version}Proxy.php");
32+
$proxy = file_get_contents(\dirname(__DIR__, 2)."/Traits/{$class}Proxy.php");
3433
$proxy = substr($proxy, 0, 2 + strpos($proxy, '[];'));
3534
$expected = substr($proxy, 0, 2 + strpos($proxy, '}'));
3635
$methods = [];
3736

38-
foreach ((new \ReflectionClass(\sprintf('Symfony\Component\Cache\Traits\\%s%dProxy', $class, $version)))->getMethods() as $method) {
39-
if ('reset' === $method->name || method_exists(RedisProxyTrait::class, $method->name)) {
37+
foreach ((new \ReflectionClass(\sprintf('Symfony\Component\Cache\Traits\\%sProxy', $class)))->getMethods() as $method) {
38+
if ('reset' === $method->name || method_exists(RedisProxyTrait::class, $method->name) || $method->isInternal()) {
4039
continue;
4140
}
4241
$return = '__construct' === $method->name || $method->getReturnType() instanceof \ReflectionNamedType && 'void' === (string) $method->getReturnType() ? '' : 'return ';
43-
$methods[$method->name] = "\n ".ProxyHelper::exportSignature($method, false, $args)."\n".<<<EOPHP
42+
$methods[$method->name] = "\n ".ProxyHelper::exportSignature($method, true, $args)."\n".<<<EOPHP
4443
{
4544
{$return}\$this->initializeLazyObject()->{$method->name}({$args});
4645
}
@@ -54,7 +53,7 @@ public function testRedisProxy($class)
5453
$methods = [];
5554

5655
foreach ((new \ReflectionClass($class))->getMethods() as $method) {
57-
if ('reset' === $method->name || method_exists(RedisProxyTrait::class, $method->name)) {
56+
if ('__destruct' === $method->name || 'reset' === $method->name) {
5857
continue;
5958
}
6059
$return = '__construct' === $method->name || $method->getReturnType() instanceof \ReflectionNamedType && 'void' === (string) $method->getReturnType() ? '' : 'return ';
@@ -88,12 +87,12 @@ public function testRelayProxy()
8887
$expectedMethods = [];
8988

9089
foreach ((new \ReflectionClass(RelayProxy::class))->getMethods() as $method) {
91-
if ('reset' === $method->name || method_exists(RedisProxyTrait::class, $method->name) || $method->isStatic()) {
90+
if ('reset' === $method->name || method_exists(RedisProxyTrait::class, $method->name) || $method->isInternal()) {
9291
continue;
9392
}
9493

9594
$return = '__construct' === $method->name || $method->getReturnType() instanceof \ReflectionNamedType && 'void' === (string) $method->getReturnType() ? '' : 'return ';
96-
$expectedMethods[$method->name] = "\n ".ProxyHelper::exportSignature($method, false, $args)."\n".<<<EOPHP
95+
$expectedMethods[$method->name] = "\n ".ProxyHelper::exportSignature($method, true, $args)."\n".<<<EOPHP
9796
{
9897
{$return}\$this->initializeLazyObject()->{$method->name}({$args});
9998
}
@@ -102,7 +101,7 @@ public function testRelayProxy()
102101
}
103102

104103
foreach ((new \ReflectionClass(Relay::class))->getMethods() as $method) {
105-
if ('reset' === $method->name || method_exists(RedisProxyTrait::class, $method->name) || $method->isStatic()) {
104+
if ('__destruct' === $method->name || 'reset' === $method->name || $method->isStatic()) {
106105
continue;
107106
}
108107
$return = '__construct' === $method->name || $method->getReturnType() instanceof \ReflectionNamedType && 'void' === (string) $method->getReturnType() ? '' : 'return ';
@@ -135,12 +134,12 @@ public function testRelayClusterProxy()
135134
$expectedMethods = [];
136135

137136
foreach ((new \ReflectionClass(RelayClusterProxy::class))->getMethods() as $method) {
138-
if ('reset' === $method->name || method_exists(RedisProxyTrait::class, $method->name) || $method->isStatic()) {
137+
if ('reset' === $method->name || method_exists(RedisProxyTrait::class, $method->name) || $method->isInternal()) {
139138
continue;
140139
}
141140

142141
$return = '__construct' === $method->name || $method->getReturnType() instanceof \ReflectionNamedType && 'void' === (string) $method->getReturnType() ? '' : 'return ';
143-
$expectedMethods[$method->name] = "\n ".ProxyHelper::exportSignature($method, false, $args)."\n".<<<EOPHP
142+
$expectedMethods[$method->name] = "\n ".ProxyHelper::exportSignature($method, true, $args)."\n".<<<EOPHP
144143
{
145144
{$return}\$this->initializeLazyObject()->{$method->name}({$args});
146145
}
@@ -149,7 +148,7 @@ public function testRelayClusterProxy()
149148
}
150149

151150
foreach ((new \ReflectionClass(RelayCluster::class))->getMethods() as $method) {
152-
if ('reset' === $method->name || method_exists(RedisProxyTrait::class, $method->name) || $method->isStatic()) {
151+
if ('__destruct' === $method->name || 'reset' === $method->name || $method->isStatic()) {
153152
continue;
154153
}
155154
$return = '__construct' === $method->name || $method->getReturnType() instanceof \ReflectionNamedType && 'void' === (string) $method->getReturnType() ? '' : 'return ';

0 commit comments

Comments
 (0)