Merge branch '7.4' into 8.0

* 7.4:
  Postal mailer transport message ID retrieval
  [PHPDoc] Fix various PHPDoc syntax errors
  Bump Symfony version to 7.3.7
  Update VERSION for 7.3.6
  Update CHANGELOG for 7.3.6
  Bump Symfony version to 6.4.29
  Update VERSION for 6.4.28
  Update CONTRIBUTORS for 6.4.28
  Update CHANGELOG for 6.4.28
  [Validator] Reviewed and corrected Belarussian translations for the Validator component in the validators.be.xlf file
  re-allow ext-redis 6.1
This commit is contained in:
Nicolas Grekas
2025-11-08 17:30:39 +01:00
7 changed files with 105 additions and 49 deletions

View File

@@ -9,7 +9,7 @@ CHANGELOG
7.4
---
* Bump ext-redis to 6.2 and ext-relay to 0.12 minimum
* Bump ext-redis to 6.1 and ext-relay to 0.12 minimum
7.3
---

View File

@@ -0,0 +1,52 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Cache\Traits;
if (version_compare(phpversion('redis'), '6.2.0', '>=')) {
/**
* @internal
*/
trait Redis62ProxyTrait
{
public function expiremember($key, $field, $ttl, $unit = null): \Redis|false|int
{
return $this->initializeLazyObject()->expiremember(...\func_get_args());
}
public function expirememberat($key, $field, $timestamp): \Redis|false|int
{
return $this->initializeLazyObject()->expirememberat(...\func_get_args());
}
public function getWithMeta($key): \Redis|array|false
{
return $this->initializeLazyObject()->getWithMeta(...\func_get_args());
}
public function serverName(): false|string
{
return $this->initializeLazyObject()->serverName(...\func_get_args());
}
public function serverVersion(): false|string
{
return $this->initializeLazyObject()->serverVersion(...\func_get_args());
}
}
} else {
/**
* @internal
*/
trait Redis62ProxyTrait
{
}
}

View File

@@ -0,0 +1,47 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Cache\Traits;
if (version_compare(phpversion('redis'), '6.2.0', '>=')) {
/**
* @internal
*/
trait RedisCluster62ProxyTrait
{
public function expiremember($key, $field, $ttl, $unit = null): \Redis|false|int
{
return $this->initializeLazyObject()->expiremember(...\func_get_args());
}
public function expirememberat($key, $field, $timestamp): \Redis|false|int
{
return $this->initializeLazyObject()->expirememberat(...\func_get_args());
}
public function getdel($key): mixed
{
return $this->initializeLazyObject()->getdel(...\func_get_args());
}
public function getWithMeta($key): \RedisCluster|array|false
{
return $this->initializeLazyObject()->getWithMeta(...\func_get_args());
}
}
} else {
/**
* @internal
*/
trait RedisCluster62ProxyTrait
{
}
}

View File

@@ -24,6 +24,7 @@ class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class);
*/
class RedisClusterProxy extends \RedisCluster implements ResetInterface, LazyObjectInterface
{
use RedisCluster62ProxyTrait;
use RedisProxyTrait {
resetLazyObject as reset;
}
@@ -273,16 +274,6 @@ class RedisClusterProxy extends \RedisCluster implements ResetInterface, LazyObj
return $this->initializeLazyObject()->expireat(...\func_get_args());
}
public function expiremember($key, $field, $ttl, $unit = null): \Redis|false|int
{
return $this->initializeLazyObject()->expiremember(...\func_get_args());
}
public function expirememberat($key, $field, $timestamp): \Redis|false|int
{
return $this->initializeLazyObject()->expirememberat(...\func_get_args());
}
public function expiretime($key): \RedisCluster|false|int
{
return $this->initializeLazyObject()->expiretime(...\func_get_args());
@@ -353,21 +344,11 @@ class RedisClusterProxy extends \RedisCluster implements ResetInterface, LazyObj
return $this->initializeLazyObject()->get(...\func_get_args());
}
public function getWithMeta($key): \RedisCluster|array|false
{
return $this->initializeLazyObject()->getWithMeta(...\func_get_args());
}
public function getbit($key, $value): \RedisCluster|false|int
{
return $this->initializeLazyObject()->getbit(...\func_get_args());
}
public function getdel($key): mixed
{
return $this->initializeLazyObject()->getdel(...\func_get_args());
}
public function getex($key, $options = []): \RedisCluster|false|string
{
return $this->initializeLazyObject()->getex(...\func_get_args());

View File

@@ -24,6 +24,7 @@ class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class);
*/
class RedisProxy extends \Redis implements ResetInterface, LazyObjectInterface
{
use Redis62ProxyTrait;
use RedisProxyTrait {
resetLazyObject as reset;
}
@@ -273,16 +274,6 @@ class RedisProxy extends \Redis implements ResetInterface, LazyObjectInterface
return $this->initializeLazyObject()->expireAt(...\func_get_args());
}
public function expiremember($key, $field, $ttl, $unit = null): \Redis|false|int
{
return $this->initializeLazyObject()->expiremember(...\func_get_args());
}
public function expirememberat($key, $field, $timestamp): \Redis|false|int
{
return $this->initializeLazyObject()->expirememberat(...\func_get_args());
}
public function expiretime($key): \Redis|false|int
{
return $this->initializeLazyObject()->expiretime(...\func_get_args());
@@ -448,11 +439,6 @@ class RedisProxy extends \Redis implements ResetInterface, LazyObjectInterface
return $this->initializeLazyObject()->getTransferredBytes(...\func_get_args());
}
public function getWithMeta($key): \Redis|array|false
{
return $this->initializeLazyObject()->getWithMeta(...\func_get_args());
}
public function getset($key, $value): \Redis|false|string
{
return $this->initializeLazyObject()->getset(...\func_get_args());
@@ -913,16 +899,6 @@ class RedisProxy extends \Redis implements ResetInterface, LazyObjectInterface
return $this->initializeLazyObject()->select(...\func_get_args());
}
public function serverName(): false|string
{
return $this->initializeLazyObject()->serverName(...\func_get_args());
}
public function serverVersion(): false|string
{
return $this->initializeLazyObject()->serverVersion(...\func_get_args());
}
public function set($key, $value, $options = null): \Redis|bool|string
{
return $this->initializeLazyObject()->set(...\func_get_args());

View File

@@ -193,7 +193,7 @@ trait RedisTrait
}
if (isset($params['sentinel']) && !class_exists(\Predis\Client::class) && !class_exists(\RedisSentinel::class) && !class_exists(Sentinel::class)) {
throw new CacheException('Redis Sentinel support requires one of: "predis/predis", "ext-redis >= 5.2", "ext-relay".');
throw new CacheException('Redis Sentinel support requires one of: "predis/predis", "ext-redis >= 6.1", "ext-relay".');
}
foreach (['lazy', 'persistent', 'cluster'] as $option) {
@@ -224,7 +224,7 @@ trait RedisTrait
};
if (isset($params['sentinel']) && !is_a($class, \Predis\Client::class, true) && !class_exists(\RedisSentinel::class) && !class_exists(Sentinel::class)) {
throw new CacheException(\sprintf('Cannot use Redis Sentinel: class "%s" does not extend "Predis\Client" and neither ext-redis >= 5.2 nor ext-relay have been found.', $class));
throw new CacheException(\sprintf('Cannot use Redis Sentinel: class "%s" does not extend "Predis\Client" and neither ext-redis >= 6.1 nor ext-relay have been found.', $class));
}
$isRedisExt = is_a($class, \Redis::class, true);

View File

@@ -42,7 +42,7 @@
"symfony/var-dumper": "^7.4|^8.0"
},
"conflict": {
"ext-redis": "<6.2",
"ext-redis": "<6.1",
"ext-relay": "<0.12.1",
"doctrine/dbal": "<4.3"
},