@@ -74,9 +74,13 @@ protected function setUp(): void
74
74
{
75
75
parent ::setUp ();
76
76
77
- $ uris = explode (', ' , getenv ('REDIS_URIS ' ) ?: 'redis://localhost ' ); // @phpstan-ignore ternary.shortNotAllowed
77
+ if (!getenv ('REDIS_URIS ' )) {
78
+ self ::markTestSkipped ('Redis server is needed ' );
79
+ }
80
+
81
+ $ redisUris = explode (', ' , getenv ('REDIS_URIS ' ));
78
82
79
- foreach ($ uris as $ redisUri ) {
83
+ foreach ($ redisUris as $ redisUri ) {
80
84
$ uri = parse_url ($ redisUri );
81
85
82
86
// original Redis::set and Redis::eval calls will reopen the connection
@@ -241,14 +245,14 @@ public static function provideSerializersAndCompressorsCases(): iterable
241
245
[\Redis::SERIALIZER_PHP , \Redis::COMPRESSION_NONE ],
242
246
];
243
247
244
- if (defined ('Redis::SERIALIZER_IGBINARY ' )) {
248
+ if (defined ('Redis::SERIALIZER_IGBINARY ' ) && extension_loaded ( ' igbinary ' ) ) {
245
249
$ options [] = [
246
250
constant ('Redis::SERIALIZER_IGBINARY ' ),
247
251
\Redis::COMPRESSION_NONE ,
248
252
];
249
253
}
250
254
251
- if (defined ('Redis::COMPRESSION_LZF ' )) {
255
+ if (defined ('Redis::COMPRESSION_LZF ' ) && extension_loaded ( ' lzf ' ) ) {
252
256
$ options [] = [
253
257
\Redis::SERIALIZER_NONE ,
254
258
constant ('Redis::COMPRESSION_LZF ' ),
@@ -258,7 +262,7 @@ public static function provideSerializersAndCompressorsCases(): iterable
258
262
constant ('Redis::COMPRESSION_LZF ' ),
259
263
];
260
264
261
- if (defined ('Redis::SERIALIZER_IGBINARY ' )) {
265
+ if (defined ('Redis::SERIALIZER_IGBINARY ' ) && extension_loaded ( ' igbinary ' ) ) {
262
266
$ options [] = [
263
267
constant ('Redis::SERIALIZER_IGBINARY ' ),
264
268
constant ('Redis::COMPRESSION_LZF ' ),
0 commit comments