Merge branch '5.4' into 6.0

* 5.4:
  [Cache] fix tests with RedisArray
This commit is contained in:
Nicolas Grekas 2022-01-17 17:16:34 +01:00
commit c44b9fc1f9
3 changed files with 3 additions and 2 deletions

View File

@ -122,7 +122,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
coverage: "none"
extensions: "json,couchbase,memcached,mongodb-1.10.0,redis,rdkafka,xsl,ldap"
extensions: "json,couchbase,memcached,mongodb-1.10.0,redis-5.3.4,rdkafka,xsl,ldap"
ini-values: date.timezone=Europe/Paris,memory_limit=-1,default_socket_timeout=10,session.gc_probability=0,apc.enable_cli=1,zend.assertions=1
php-version: "${{ matrix.php }}"
tools: pecl

View File

@ -50,6 +50,7 @@ class ProxyAdapterAndRedisAdapterTest extends AbstractRedisAdapterTest
);
$cache = $this->createCachePool(1);
$cache->clear();
$value = rand();
$item = $cache->getItem('foo');
$setCacheItemExpiry($item, 0);

View File

@ -180,7 +180,7 @@ trait RedisTrait
$initializer = static function ($redis) use ($connect, $params, $dsn, $auth, $hosts, $tls) {
$host = $hosts[0]['host'] ?? $hosts[0]['path'];
$port = $hosts[0]['port'] ?? null;
$port = $hosts[0]['port'] ?? 6379;
if (isset($hosts[0]['host']) && $tls) {
$host = 'tls://'.$host;