Skip to content

Commit 6fbbb89

Browse files
authored
Remove Webdis and phpiredis (#1291)
* remove webdis and phpiredis * update changelog * add pr number
1 parent b8f80aa commit 6fbbb89

17 files changed

+13
-1777
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
## Changelog
22

3+
## Unreleased
4+
5+
### Changed
6+
- Added `PrefixableCommandInterface` (#1262)
7+
8+
### Removed
9+
- Removed Webdis and Phpiredis support (#1291)
10+
311
## v2.2.0-RC1 (2023-05-09)
412

513
### Added

phpstan.dist.neon

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ parameters:
1212
- message: "#^Cannot cast Predis\\\\Connection\\\\ConnectionInterface to string\\.$#"
1313
count: 1
1414
path: src/Client.php
15-
# phpiredis extension is not installed
16-
- "#^Function phpiredis_\\w+ not found\\.$#"
17-
- "#^Constant PHPIREDIS_#"
1815
# "new static" in non-final classes
1916
- message: "#^Unsafe usage of new static\\(\\)\\.$#"
2017
count: 3

phpunit.relay.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@
2020
<groups>
2121
<exclude>
2222
<group>relay-incompatible</group>
23-
<group>realm-webdis</group>
2423
<group>realm-stack</group>
2524
<group>ext-curl</group>
26-
<group>ext-phpiredis</group>
2725
</exclude>
2826
</groups>
2927

phpunit.xml.dist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,9 @@
2828

2929
<groups>
3030
<exclude>
31-
<group>realm-webdis</group>
3231
<group>realm-stack</group>
3332
<group>ext-relay</group>
3433
<group>ext-curl</group>
35-
<group>ext-phpiredis</group>
3634
<!-- <group>connected</group> -->
3735
<!-- <group>disconnected</group> -->
3836
<!-- <group>commands</group> -->

src/Cluster/Hash/PhpiredisCRC16.php

Lines changed: 0 additions & 42 deletions
This file was deleted.

src/Configuration/Option/CRC16.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,17 @@ class CRC16 implements OptionInterface
2626
* Returns an hash generator instance from a descriptive name.
2727
*
2828
* @param OptionsInterface $options Client options.
29-
* @param string $description Identifier of a hash generator (`predis`, `phpiredis`)
29+
* @param string $description Identifier of a hash generator (`predis`)
3030
*
3131
* @return callable
3232
*/
3333
protected function getHashGeneratorByDescription(OptionsInterface $options, $description)
3434
{
3535
if ($description === 'predis') {
3636
return new Hash\CRC16();
37-
} elseif ($description === 'phpiredis') {
38-
return new Hash\PhpiredisCRC16();
3937
} else {
4038
throw new InvalidArgumentException(
41-
'String value for the crc16 option must be either `predis` or `phpiredis`'
39+
'String value for the crc16 option must be either `predis`'
4240
);
4341
}
4442
}
@@ -67,8 +65,6 @@ public function filter(OptionsInterface $options, $value)
6765
*/
6866
public function getDefault(OptionsInterface $options)
6967
{
70-
return function_exists('phpiredis_utils_crc16')
71-
? new Hash\PhpiredisCRC16()
72-
: new Hash\CRC16();
68+
return new Hash\CRC16();
7369
}
7470
}

src/Configuration/Option/Connections.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
use Predis\Configuration\OptionsInterface;
1818
use Predis\Connection\Factory;
1919
use Predis\Connection\FactoryInterface;
20-
use Predis\Connection\PhpiredisSocketConnection;
21-
use Predis\Connection\PhpiredisStreamConnection;
2220
use Predis\Connection\RelayConnection;
2321

2422
/**
@@ -87,9 +85,6 @@ protected function createFactoryByArray(OptionsInterface $options, array $value)
8785
* string that identifies specific configurations of schemes and connection
8886
* classes. Supported configuration values are:
8987
*
90-
* - "phpiredis-stream" maps tcp, redis, unix to PhpiredisStreamConnection
91-
* - "phpiredis-socket" maps tcp, redis, unix to PhpiredisSocketConnection
92-
* - "phpiredis" is an alias of "phpiredis-stream"
9388
* - "relay" maps tcp, redis, unix, tls, rediss to RelayConnection
9489
*
9590
* @param OptionsInterface $options Client options
@@ -105,19 +100,6 @@ protected function createFactoryByString(OptionsInterface $options, string $valu
105100
$factory = $this->getDefault($options);
106101

107102
switch (strtolower($value)) {
108-
case 'phpiredis':
109-
case 'phpiredis-stream':
110-
$factory->define('tcp', PhpiredisStreamConnection::class);
111-
$factory->define('redis', PhpiredisStreamConnection::class);
112-
$factory->define('unix', PhpiredisStreamConnection::class);
113-
break;
114-
115-
case 'phpiredis-socket':
116-
$factory->define('tcp', PhpiredisSocketConnection::class);
117-
$factory->define('redis', PhpiredisSocketConnection::class);
118-
$factory->define('unix', PhpiredisSocketConnection::class);
119-
break;
120-
121103
case 'relay':
122104
$factory->define('tcp', RelayConnection::class);
123105
$factory->define('redis', RelayConnection::class);

src/Connection/Factory.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ class Factory implements FactoryInterface
3030
'tls' => 'Predis\Connection\StreamConnection',
3131
'redis' => 'Predis\Connection\StreamConnection',
3232
'rediss' => 'Predis\Connection\StreamConnection',
33-
'http' => 'Predis\Connection\WebdisConnection',
3433
];
3534

3635
/**

0 commit comments

Comments
 (0)