Skip to content

Commit 995ac0a

Browse files
Merge branch '5.4' into 6.0
* 5.4: [Semaphore] fix tests [HttpClient] fix destructing CurlResponse [Cache] Fix connecting to Redis via a socket file [DependencyInjection][FrameworkBundle] Fix using PHP 8.1 enum as parameters [PropertyAccessor] Add missing TypeError catch [HttpKernel] Fixed error count by log not displayed in WebProfilerBundle Added `kernel.event_listener` to the default list of behavior describing tags, fixing AsEventListener attribute not working on decorators. [WebProfilerBundle] Fixes weird spacing in log message context/trace output [Notifier] fix Microsoft Teams webhook url [FrameworkBundle] Fix log channel of TagAwareAdapter [Postmark] ensure only a single tag can be used with Postmark [Mailer] allow Mailchimp to handle multiple TagHeader's [HttpClient] Fix Content-Length header when possible [DependencyInjection] Don't dump polyfilled classes in preload script
2 parents 07aae10 + 952c4fa commit 995ac0a

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Tests/Store/CombinedStoreTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected function getClockDelay()
4343
*/
4444
public function getStore(): PersistingStoreInterface
4545
{
46-
$redis = new \Predis\Client('tcp://'.getenv('REDIS_HOST').':6379');
46+
$redis = new \Predis\Client(array_combine(['host', 'port'], explode(':', getenv('REDIS_HOST')) + [1 => null]));
4747
try {
4848
$redis->connect();
4949
} catch (\Exception $e) {

Tests/Store/PredisStoreTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class PredisStoreTest extends AbstractRedisStoreTest
2121
{
2222
public static function setUpBeforeClass(): void
2323
{
24-
$redis = new \Predis\Client('tcp://'.getenv('REDIS_HOST').':6379');
24+
$redis = new \Predis\Client(array_combine(['host', 'port'], explode(':', getenv('REDIS_HOST')) + [1 => null]));
2525
try {
2626
$redis->connect();
2727
} catch (\Exception $e) {
@@ -31,7 +31,7 @@ public static function setUpBeforeClass(): void
3131

3232
protected function getRedisConnection(): \Predis\Client
3333
{
34-
$redis = new \Predis\Client('tcp://'.getenv('REDIS_HOST').':6379');
34+
$redis = new \Predis\Client(array_combine(['host', 'port'], explode(':', getenv('REDIS_HOST')) + [1 => null]));
3535
$redis->connect();
3636

3737
return $redis;

Tests/Store/RedisArrayStoreTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static function setUpBeforeClass(): void
2727
throw new SkippedTestSuiteError('The RedisArray class is required.');
2828
}
2929
try {
30-
(new \Redis())->connect(getenv('REDIS_HOST'));
30+
(new \Redis())->connect(...explode(':', getenv('REDIS_HOST')));
3131
} catch (\Exception $e) {
3232
throw new SkippedTestSuiteError($e->getMessage());
3333
}

Tests/Store/RedisStoreTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class RedisStoreTest extends AbstractRedisStoreTest
2828
public static function setUpBeforeClass(): void
2929
{
3030
try {
31-
(new \Redis())->connect(getenv('REDIS_HOST'));
31+
(new \Redis())->connect(...explode(':', getenv('REDIS_HOST')));
3232
} catch (\Exception $e) {
3333
throw new SkippedTestSuiteError($e->getMessage());
3434
}
@@ -37,7 +37,7 @@ public static function setUpBeforeClass(): void
3737
protected function getRedisConnection(): \Redis
3838
{
3939
$redis = new \Redis();
40-
$redis->connect(getenv('REDIS_HOST'));
40+
$redis->connect(...explode(':', getenv('REDIS_HOST')));
4141

4242
return $redis;
4343
}

0 commit comments

Comments
 (0)