@@ -74,9 +74,13 @@ protected function setUp(): void
7474 {
7575 parent ::setUp ();
7676
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 ' ));
7882
79- foreach ($ uris as $ redisUri ) {
83+ foreach ($ redisUris as $ redisUri ) {
8084 $ uri = parse_url ($ redisUri );
8185
8286 // original Redis::set and Redis::eval calls will reopen the connection
@@ -241,14 +245,14 @@ public static function provideSerializersAndCompressorsCases(): iterable
241245 [\Redis::SERIALIZER_PHP , \Redis::COMPRESSION_NONE ],
242246 ];
243247
244- if (defined ('Redis::SERIALIZER_IGBINARY ' )) {
248+ if (defined ('Redis::SERIALIZER_IGBINARY ' ) && extension_loaded ( ' igbinary ' ) ) {
245249 $ options [] = [
246250 constant ('Redis::SERIALIZER_IGBINARY ' ),
247251 \Redis::COMPRESSION_NONE ,
248252 ];
249253 }
250254
251- if (defined ('Redis::COMPRESSION_LZF ' )) {
255+ if (defined ('Redis::COMPRESSION_LZF ' ) && extension_loaded ( ' lzf ' ) ) {
252256 $ options [] = [
253257 \Redis::SERIALIZER_NONE ,
254258 constant ('Redis::COMPRESSION_LZF ' ),
@@ -258,7 +262,7 @@ public static function provideSerializersAndCompressorsCases(): iterable
258262 constant ('Redis::COMPRESSION_LZF ' ),
259263 ];
260264
261- if (defined ('Redis::SERIALIZER_IGBINARY ' )) {
265+ if (defined ('Redis::SERIALIZER_IGBINARY ' ) && extension_loaded ( ' igbinary ' ) ) {
262266 $ options [] = [
263267 constant ('Redis::SERIALIZER_IGBINARY ' ),
264268 constant ('Redis::COMPRESSION_LZF ' ),
0 commit comments