strider2038 / json-rpc-client
Flexible JSON RPC v2 client for PHP written in object-oriented style
Installs: 7 551
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: ^7.4|^8.0
- ext-json: *
Requires (Dev)
- ext-curl: *
- doctrine/annotations: ^1.6
- guzzlehttp/guzzle: ^6.3
- nyholm/psr7: ^1.0
- phake/phake: ^4.0
- phpstan/phpstan: ^0.12.5
- phpstan/phpstan-phpunit: ^0.12.8
- phpstan/phpstan-symfony: ^0.12.6
- phpunit/phpunit: ^8.0
- psr/http-client: ^1.0
- psr/log: ^1.0
- ramsey/uuid: ^4.0
- symfony/framework-bundle: ^4.3 || ^5.0
- symfony/http-client: ^4.3 || ^5.0
- symfony/property-access: ^4.3 || ^5.0
- symfony/property-info: ^4.3 || ^5.0
- symfony/serializer: ^4.3 || ^5.0
- symfony/yaml: ^4.3 || ^5.0
- symplify/easy-coding-standard: ^9.0
Suggests
- ext-curl: Recommended for use with HTTP transport to improve performance
- doctrine/annotations: To use serialization with annotation options
- guzzlehttp/guzzle: To use HTTP transport via Guzzle
- nyholm/psr7: To use HTTP transport compatible with PSR-18
- psr/http-client: To use HTTP transport compatible with PSR-18
- psr/log: To use logging capabilities
- ramsey/uuid: To generate UUID identifiers for request objects
- symfony/http-client: To use HTTP transport via Symfony Http Client component
- symfony/property-access: Required for Symfony Serializer
- symfony/property-info: Required for Symfony Serializer
- symfony/serializer: To use request and response serialization via Symfony Serializer component
README
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