strider2038/json-rpc-client

Flexible JSON RPC v2 client for PHP written in object-oriented style

v0.5.0 2021-08-11 16:17 UTC

This package is auto-updated.

Last update: 2024-04-11 21:39:10 UTC


README

Latest Stable Version Total Downloads License Test Build Status Code Coverage Scrutinizer Code Quality StyleCI

Flexible JSON RPC v2 client for PHP written in object-oriented style.

  • Works under HTTP protocol (via Guzzle or Symfony Http Client) and TCP/Unix sockets (without any dependencies).
  • Can be used with Symfony Serializer to serialize requests and responses.
  • Can be used as Symfony bundle.
  • Can be used with any PSR-18 compatible HTTP client.
  • Implements reconnection algorithm for socket transport (useful for long-running processes).

Installation

Use composer to install library. It is recommended to fix minor version while library is under development.

composer require strider2038/json-rpc-client ^0.5

Also, if you want to use it over HTTP protocol you have to install one of those clients: Guzzle or Symfony Http Client.

composer require guzzlehttp/guzzle
# or
composer require symfony/http-client

How to use

Possible features for next releases

  • Object annotations for Symfony Bundle
  • Symfony application example
  • Caller context for possible authorization
  • Bridge for JMS Serializer
  • Web socket transport