scaytrase/json-rpc-client
Lightweight PHP JSON-RPC client for calling remote procedures over HTTP. Provides request/response handling, batching, and error parsing, making it easier to integrate JSON-RPC services into your Laravel or vanilla PHP apps with minimal setup.
scaytrase/json-rpc-client package provides a lightweight JSON-RPC 2.0 client implementation, which is ideal for Laravel applications requiring asynchronous RPC communication (e.g., microservices, external APIs, or legacy system integrations). It aligns well with Laravel’s service-oriented architecture if RPC is a core requirement.rector/rector or php-di/http-client).filp/whoops or overblog/graphql-bundle) or REST (Guzzle) suffice?-32601 invalid method) map to Laravel’s exception hierarchy?php-rpc/client) or Laravel-specific packages (e.g., spatie/array-to-object) for similar use cases?phpunit/phpunit or phpstan/phpstan.config/app.php to bind the client to the container:
$app->singleton('rpcClient', function () {
return new \Scaytrase\JsonRpc\Client('https://api.example.com/rpc');
});
$client = new \Scaytrase\JsonRpc\Client(new \GuzzleHttp\Client());
auth:api) via higher-order functions or decorators.php-rpc/client).composer require guzzlehttp/guzzle:^6.5 if needed.bus system) for async processing.client->call('method', [$args])).JsonRpcException → HttpException).\Log::debug) for RPC requests/responses.throttle middleware).spatie/laravel-activitylog for failed RPCs).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Package incompatibility | Breaks RPC calls | Fork/replace with php-rpc/client |
| External API downtime | RPC failures | Retry logic + queue fallback |
| Malformed RPC responses | App crashes or data corruption | Validate responses with json_last_error() |
| PHP version deprecations | Runtime errors | Polyfills or upgrade path planning |
| Security vulnerabilities | Data leaks or exploits | Isolate RPC calls; use WAF rules |
php -d detect_unicode=0 for compatibility).How can I help you explore Laravel packages today?