strider2038/json-rpc-client

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


Keywords
http, client, tcp, unix, jsonrpc, jsonrpc2, psr18, php, socket, symfony, php7, symfony-bundle, json-rpc
License
MIT

Documentation

JSON RPC v2 client for PHP

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