Skip to content

Commit dd3ef59

Browse files
committed
minor symfony#52983 [Messenger] Fix Redis integration tests data provider (alexandre-daubois)
This PR was merged into the 7.1 branch. Discussion ---------- [Messenger] Fix Redis integration tests data provider | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | - | License | MIT This fixes the data provider for `RedisExtIntegrationTest` and add `redis_sentinel` as a valid option Commits ------- 4b20186 [Messenger] Fix Redis integration tests data provider
2 parents 49d00f6 + 4b20186 commit dd3ef59

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisExtIntegrationTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public function testConnectionClaimAndRedeliver()
221221
}
222222

223223
/**
224-
* @dataProvider
224+
* @dataProvider sentinelOptionNames
225225
*/
226226
public function testSentinel(string $sentinelOptionName)
227227
{
@@ -252,10 +252,10 @@ public function testSentinel(string $sentinelOptionName)
252252
$connection->cleanup();
253253
}
254254

255-
public function sentinelOptionNames(): iterable
255+
public static function sentinelOptionNames(): \Generator
256256
{
257-
yield 'redis_sentinel';
258-
yield 'sentinel_master';
257+
yield ['redis_sentinel'];
258+
yield ['sentinel_master'];
259259
}
260260

261261
public function testLazySentinel()

src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class Connection
4747
'auth' => null,
4848
'serializer' => 1, // see \Redis::SERIALIZER_PHP,
4949
'sentinel_master' => null, // String, master to look for (optional, default is NULL meaning Sentinel support is disabled)
50+
'redis_sentinel' => null, // String, alias for 'sentinel_master'
5051
'timeout' => 0.0, // Float, value in seconds (optional, default is 0 meaning unlimited)
5152
'read_timeout' => 0.0, // Float, value in seconds (optional, default is 0 meaning unlimited)
5253
'retry_interval' => 0, // Int, value in milliseconds (optional, default is 0)

0 commit comments

Comments
 (0)