{"id":34126626,"url":"https://github.com/nrk/predis-async","last_synced_at":"2026-04-02T18:46:01.595Z","repository":{"id":3334534,"uuid":"4378504","full_name":"nrk/predis-async","owner":"nrk","description":"Asynchronous PHP client library for Redis built on top of ReactPHP","archived":false,"fork":false,"pushed_at":"2018-09-12T07:32:40.000Z","size":273,"stargazers_count":366,"open_issues_count":13,"forks_count":59,"subscribers_count":28,"default_branch":"master","last_synced_at":"2026-01-02T09:26:57.630Z","etag":null,"topics":["async","asynchronous","php","predis","reactphp","redis"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nrk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-05-19T14:06:25.000Z","updated_at":"2025-12-22T11:42:03.000Z","dependencies_parsed_at":"2022-09-01T08:10:49.416Z","dependency_job_id":null,"html_url":"https://github.com/nrk/predis-async","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/nrk/predis-async","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrk%2Fpredis-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrk%2Fpredis-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrk%2Fpredis-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrk%2Fpredis-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nrk","download_url":"https://codeload.github.com/nrk/predis-async/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrk%2Fpredis-async/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31313321,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","asynchronous","php","predis","reactphp","redis"],"created_at":"2025-12-14T23:46:26.623Z","updated_at":"2026-04-02T18:46:01.588Z","avatar_url":"https://github.com/nrk.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Predis\\Async #\n\n[![Software license][ico-license]](LICENSE)\n[![Latest stable][ico-version-stable]][link-packagist]\n[![Latest development][ico-version-dev]][link-packagist]\n[![Monthly installs][ico-downloads-monthly]][link-downloads]\n[![Build status][ico-travis]][link-travis]\n[![HHVM support][ico-hhvm]][link-hhvm]\n\nAsynchronous (non-blocking) version of [Predis](https://github.com/nrk/predis), the full-featured\nPHP client library for [Redis](http://redis.io), built on top of [React](http://reactphp.org/) to\nhandle evented I/O. By default Predis\\Async does not require any additional C extension to work, but\nit can be optionally paired with [phpiredis](https://github.com/nrk/phpiredis) to sensibly lower the\noverhead of serializing and parsing the Redis protocol.\n\nPredis\\Async is currently under development but already works pretty well. The client foundation is\nbeing built on top of the event loop abstraction offered by [React](https://github.com/reactphp), an\nevent-oriented framework for PHP that aims to provide everything needed to create reusable libraries\nand long-running applications using an evented approach powered by non-blocking I/O. This library is\npartially tested on [HHVM](http://www.hhvm.com), but support for this runtime should be considered\nexperimental.\n\nContributions are highly welcome and appreciated, feel free to open pull-requests with fixes or just\n[report issues](https://github.com/nrk/predis-async/issues) if you encounter weird behaviors and\nblatant bugs.\n\n## Main features ##\n\n- Wide range of Redis versions supported (from __2.0__ to __3.0__ and __unstable__) using profiles.\n- Transparent key prefixing for all known Redis commands using a customizable prefixing strategy.\n- Abstraction for `MULTI` / `EXEC` transactions (Redis \u003e= 2.0).\n- Abstraction for `PUBLISH` / `SUBSCRIBE` contexts (Redis \u003e= 2.0).\n- Abstraction for `MONITOR` contexts (Redis \u003e= 1.2).\n- Abstraction for Lua scripting (Redis \u003e= 2.6).\n- Ability to connect to Redis using TCP/IP or UNIX domain sockets.\n- Redis connections can be established lazily, commands are queued while the client is connecting.\n- Flexible system for defining and registering custom sets of supported commands or profiles.\n\n## Installing ##\n\nPredis\\Async is available on [Packagist](http://packagist.org/packages/predis/predis-async). It is\nnot required to have the [phpiredis](https://github.com/nrk/phpiredis) extension loaded as suggested\nsince the client will work anyway using a pure-PHP protocol parser, but if the extension is detected\nat runtime then it will be automatically preferred over the slower default. It is possible to force\nthe client to use the pure-PHP protocol parser even when the extension is detected simply by passing\n`['phpiredis' =\u003e false]` in the array of client options.\n\n## Example ##\n\n``` php\n\u003c?php\nrequire __DIR__.'/../autoload.php';\n\n$loop = new React\\EventLoop\\StreamSelectLoop();\n$client = new Predis\\Async\\Client('tcp://127.0.0.1:6379', $loop);\n\n$client-\u003econnect(function ($client) use ($loop) {\n    echo \"Connected to Redis, now listening for incoming messages...\\n\";\n\n    $logger = new Predis\\Async\\Client('tcp://127.0.0.1:6379', $loop);\n\n    $client-\u003epubSubLoop('nrk:channel', function ($event) use ($logger) {\n        $logger-\u003erpush(\"store:{$event-\u003echannel}\", $event-\u003epayload, function () use ($event) {\n            echo \"Stored message `{$event-\u003epayload}` from {$event-\u003echannel}.\\n\";\n        });\n    });\n});\n\n$loop-\u003erun();\n```\n\n## Differences with Predis ##\n\nBeing an asynchronous client implementation, the underlying design of Predis\\Async is different from\nthe one of Predis which is a blocking implementation. Certain features have not been implemented yet\n(or cannot be implemented at all), just to name a few you will not find the usual abstractions for\npipelining commands and creating cluster of nodes using client-side sharding. That said, they share\na common style and a few basic classes so if you used Predis in the past you should feel at home.\n\n## Contributing ##\n\nIf you want to work on Predis\\Async, it is highly recommended that you first run the test suite in\norder to check that everything is OK, and report strange behaviours or bugs. When modifying the code\nplease make sure that no warnings or notices are emitted by PHP by running the interpreter in your\ndevelopment environment with the `error_reporting` variable set to `E_ALL | E_STRICT`.\n\nThe recommended way to contribute to Predis\\Async is to fork the project on GitHub, create new topic\nbranches on your newly created repository to fix or add features (possibly with tests covering your\nmodifications) and then open a new pull request with a description of the applied changes. Obviously\nyou can use any other Git hosting provider of your preference.\n\nPlease follow a few basic [commit guidelines](http://git-scm.com/book/ch5-2.html#Commit-Guidelines)\nbefore opening pull requests.\n\n### Project ###\n- [Source code](https://github.com/nrk/predis-async/)\n- [Issue tracker](https://github.com/nrk/predis-async/issues)\n\n## Author ##\n\n- [Daniele Alessandri](mailto:suppakilla@gmail.com) ([twitter](http://twitter.com/JoL1hAHN))\n\n## License ##\n\nThe code for Predis\\Async is distributed under the terms of the MIT license (see LICENSE).\n\n[ico-license]: https://img.shields.io/github/license/nrk/predis-async.svg?style=flat-square\n[ico-version-stable]: https://img.shields.io/packagist/v/predis/predis-async.svg?style=flat-square\n[ico-version-dev]: https://img.shields.io/packagist/vpre/predis/predis-async.svg?style=flat-square\n[ico-downloads-monthly]: https://img.shields.io/packagist/dm/predis/predis-async.svg?style=flat-square\n[ico-travis]: https://img.shields.io/travis/nrk/predis-async.svg?style=flat-square\n[ico-hhvm]: https://img.shields.io/hhvm/predis/predis-async.svg?style=flat-square\n\n[link-packagist]: https://packagist.org/packages/predis/predis-async\n[link-travis]: https://travis-ci.org/nrk/predis-async\n[link-downloads]: https://packagist.org/packages/predis/predis-async/stats\n[link-hhvm]: http://hhvm.h4cc.de/package/predis/predis-async\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnrk%2Fpredis-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnrk%2Fpredis-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnrk%2Fpredis-async/lists"}