diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..9c09fb8 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: clue +custom: https://clue.engineering/support diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..cc91aac --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013 Christian Lück + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 1b68cfa..1444e59 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,24 @@ -# clue/redis-protocol [![Build Status](https://travis-ci.org/clue/php-redis-protocol.png?branch=master)](https://travis-ci.org/clue/php-redis-protocol) +# clue/redis-protocol -[![CI status](https://github.com/clue/php-redis-protocol/actions/workflows/ci.yml/badge.svg)](https://github.com/clue/php-redis-protocol/actions) +[![CI status](https://github.com/clue/redis-protocol/actions/workflows/ci.yml/badge.svg)](https://github.com/clue/redis-protocol/actions) [![installs on Packagist](https://img.shields.io/packagist/dt/clue/redis-protocol?color=blue&label=installs%20on%20Packagist)](https://packagist.org/packages/clue/redis-protocol) -A streaming redis protocol parser and serializer written in PHP +A streaming Redis protocol (RESP) parser and serializer written in pure PHP. -This parser and serializer implementation allows you to parse redis protocol +This parser and serializer implementation allows you to parse Redis protocol messages into native PHP values and vice-versa. This is usually needed by a -redis client implementation which also handles the connection socket. +Redis client implementation which also handles the connection socket. -To re-iterate: This is *not* a redis client implementation. This is a protocol -implementation that is usually used by a redis client implementation. If you're +To re-iterate: This is *not* a Redis client implementation. This is a protocol +implementation that is usually used by a Redis client implementation. If you're looking for an easy way to build your own client implementation, then this is -for you. If you merely want to connect to a redis server and issue some +for you. If you merely want to connect to a Redis server and issue some commands, you're probably better off using one of the existing client implementations. **Table of contents** +* [Support us](#support-us) * [Quickstart example](#quickstart-example) * [Usage](#usage) * [Factory](#factory) @@ -27,6 +28,16 @@ implementations. * [Install](#install) * [License](#license) +## Support us + +We invest a lot of time developing, maintaining and updating our awesome +open-source projects. You can help us sustain this high-quality of our work by +[becoming a sponsor on GitHub](https://github.com/sponsors/clue). Sponsors get +numerous benefits in return, see our [sponsoring page](https://github.com/sponsors/clue) +for details. + +Let's take these projects to the next level together! 🚀 + ## Quickstart example ```php @@ -62,15 +73,15 @@ your use-case). ### Parser -The library includes a streaming redis protocol parser. As such, it can safely -parse redis protocol messages and work with an incomplete data stream. For this, +The library includes a streaming Redis protocol parser. As such, it can safely +parse Redis protocol messages and work with an incomplete data stream. For this, each included parser implements a single method `ParserInterface::pushIncoming($chunk)`. -* The `ResponseParser` is what most redis client implementation would want to - use in order to parse incoming response messages from a redis server instance. -* The `RequestParser` can be used to test messages coming from a redis client or - even to implement a redis server. +* The `ResponseParser` is what most Redis client implementation would want to + use in order to parse incoming response messages from a Redis server instance. +* The `RequestParser` can be used to test messages coming from a Redis client or + even to implement a Redis server. * The `MessageBuffer` decorates either of the available parsers and merely offers some helper methods in order to work with single messages: * `hasIncomingModel()` to check if there's a complete message in the pipeline @@ -121,7 +132,7 @@ assert($model implement Model\MultiBulkReply); ## Install It's very unlikely you'll want to use this protocol parser standalone. -It should be added as a dependency to your redis client implementation instead. +It should be added as a dependency to your Redis client implementation instead. The recommended way to install this library is [through Composer](https://getcomposer.org). [New to Composer?](https://getcomposer.org/doc/00-intro.md) @@ -139,4 +150,7 @@ Its parser and serializer originally used to be based on [jpd/redisent](https://github.com/jdp/redisent), which is released under the ISC license, copyright (c) 2009-2012 Justin Poliey . -Other than that, this library is MIT licensed. +Other than that, this project is released under the permissive [MIT license](LICENSE). + +> Did you know that I offer custom development services and issuing invoices for + sponsorships of releases and for contributions? Contact me (@clue) for details. diff --git a/composer.json b/composer.json index 7c7b5e3..66c804a 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "name": "clue/redis-protocol", - "description": "A streaming redis wire protocol parser and serializer implementation in PHP", - "keywords": ["streaming", "redis", "protocol", "parser", "serializer"], - "homepage": "https://github.com/clue/php-redis-protocol", + "description": "A streaming Redis protocol (RESP) parser and serializer written in pure PHP.", + "keywords": ["streaming", "redis", "protocol", "resp", "parser", "serializer"], + "homepage": "https://github.com/clue/redis-protocol", "license": "MIT", "authors": [ {