diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 72002fa8998e..44aff90b5a81 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -71,7 +71,7 @@ jobs: uses: shivammathur/setup-php@v2 with: coverage: "none" - extensions: "memcached,redis,xsl,ldap" + extensions: "memcached,redis-5.3.4,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 }}" diff --git a/src/Symfony/Component/Cache/Tests/Adapter/ProxyAdapterAndRedisAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/ProxyAdapterAndRedisAdapterTest.php index 46516e0095e6..37282e8fceee 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/ProxyAdapterAndRedisAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/ProxyAdapterAndRedisAdapterTest.php @@ -50,6 +50,7 @@ static function (CacheItem $item, $expiry) { ); $cache = $this->createCachePool(1); + $cache->clear(); $value = rand(); $item = $cache->getItem('foo'); $setCacheItemExpiry($item, 0); diff --git a/src/Symfony/Component/Cache/Traits/RedisTrait.php b/src/Symfony/Component/Cache/Traits/RedisTrait.php index 649d50704ff2..d2e73ae566e6 100644 --- a/src/Symfony/Component/Cache/Traits/RedisTrait.php +++ b/src/Symfony/Component/Cache/Traits/RedisTrait.php @@ -185,7 +185,7 @@ public static function createConnection($dsn, array $options = []) $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;