8000 Deprecate webdis and phpiredis by tillkruss · Pull Request #1179 · predis/predis · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Deprecate webdis and phpiredis #1179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
- Fix `@template` in `Predis\Client` (#1017)
- Fix support options array in `ZINTERSTORE` and `ZUNIONSTORE` (#1018)

## Deprecated
- Deprecated phpiredis and webdis connections

## v2.1.0 (2023-01-16)

## New Features
Expand Down
26 changes: 0 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ More details about this project can be found on the [frequently asked questions]
- Abstraction for `SCAN`, `SSCAN`, `ZSCAN` and `HSCAN` (Redis >= 2.8) based on PHP iterators.
- Connections are established lazily by the client upon the first command and can be persisted.
- Connections can be established via TCP/IP (also TLS/SSL-encrypted) or UNIX domain sockets.
- Support for [Webdis](http://webd.is) (requires both `ext-curl` and `ext-phpiredis`).
- Support for custom connection classes for providing different network or protocol backends.
- Flexible system for defining custom commands and override the default ones.

Expand Down Expand Up @@ -397,31 +396,6 @@ $response = $client->lpushrand('random_values', $seed = mt_rand());

### Customizable connection backends ###

Predis can use different connection backends to connect to Redis. Two of them leverage a third party
extension such as [phpiredis](https://github.com/nrk/phpiredis) resulting in major performance gains
especially when dealing with big multibulk responses. While one is based on PHP streams, the other
is based on socket resources provided by `ext-socket`. Both support TCP/IP and UNIX domain sockets:

```php
$client = new Predis\Client('tcp://127.0.0.1', [
'connections' => [
'tcp' => 'Predis\Connection\PhpiredisStreamConnection', // PHP stream resources
'unix' => 'Predis\Connection\PhpiredisSocketConnection', // ext-socket resources
],
]);
```

The client can also be configured to rely on a [phpiredis](https://github.com/nrk/phpiredis)-backend
by specifying a descriptive string for the `connections` client option. Supported string values are:

- `phpiredis-stream` maps `tcp`, `redis` and `unix` to `Predis\Connection\PhpiredisStreamConnection`
- `phpiredis-socket` maps `tcp`, `redis` and `unix` to `Predis\Connection\PhpiredisSocketConnection`
- `phpiredis` is simply an alias of `phpiredis-stream`

```php
$client = new Predis\Client('tcp://127.0.0.1', ['connections' => 'phpiredis']);
```

Developers can create their own connection classes to support whole new network backends, extend
existing classes or provide completely different implementations. Connection classes must implement
`Predis\Connection\NodeConnectionInterface` or extend `Predis\Connection\AbstractConnection`:
Expand Down
2 changes: 2 additions & 0 deletions src/Cluster/Hash/PhpiredisCRC16.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

/**
* Hash generator implementing the CRC-CCITT-16 algorithm used by redis-cluster.
*
* @deprecated 2.1.2
*/
class PhpiredisCRC16 implements HashGeneratorInterface
{
Expand Down
1 change: 1 addition & 0 deletions src/Connection/PhpiredisSocketConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
* - read_write_timeout: timeout of read / write operations.
*
* @see http://github.com/nrk/phpiredis
* @deprecated 2.1.2
*/
class PhpiredisSocketConnection extends AbstractConnection
{
Expand Down
1 change: 1 addition & 0 deletions src/Connection/PhpiredisStreamConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
* - persistent: the connection is left intact after a GC collection.
*
* @see https://github.com/nrk/phpiredis
* @deprecated 2.1.2
*/
class PhpiredisStreamConnection extends StreamConnection
{
Expand Down
1 change: 1 addition & 0 deletions src/Connection/WebdisConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
* @see http://webd.is
* @see http://github.com/nicolasff/webdis
* @see http://github.com/seppo0010/phpiredis
* @deprecated 2.1.2
*/
class WebdisConnection implements NodeConnectionInterface
{
Expand Down
0