fguillot/json-rpc
A lightweight PHP implementation of JSON-RPC 2.0 for building clients and servers. It supports method calls, notifications, batch requests, and error handling, with a clean API for exposing PHP classes as remote services. Good for creating APIs or integrating with JSON-RPC services.
fguillot/json-rpc remains a narrow JSON-RPC client/server utility rather than a Laravel-native integration, best used behind an application-owned adapter for internal service-to-service calls, legacy RPC endpoints, control-plane APIs, or narrowly scoped command channels. Not a default choice for public APIs or platform-wide messaging.ServerErrorException), and response validation now rejects mismatched ids and non-answer JSON rather than returning null. These are improvements, but they are contract-visible and must be encoded in the adapter and tests.2.x branch. That is a schedule and stability risk, not a quality risk.["5","3"] to function (int $a, int $b) now receives -32602 Invalid params. This will break existing deployments whose callers send loosely typed payloads, and it changes behaviour for both client and server modes. UPGRADE-2.0.md is now a required input to any plan.Max-Age=0, past Expires) are no longer replayed; answers carrying another request's id or non-answer JSON are refused, including per-call inside batches; truncated bodies are detected across stream, cURL and PSR-7 transports; compressed bodies are correctly distinguished from malformed payloads. These directly reduce replay/cookie-leak, response-confusion, and silent-null failure modes — relevant if the server component is ever exposed, though it does not substitute for authn/authz, rate limiting, and input validation.Expect: 100-continue, removing ~1s latency on requests above 1 MB; PSR-7 truncated bodies now raise ConnectionFailureException instead of a bare RuntimeException. Both are net positive but are observable changes for any existing retry/exception logic.withAuthenticationHeader() parses scheme-prefixed headers (Basic <base64>). Small but real reductions in custom workaround code.fguillot/json-rpc while releases are published from matasarei/json-rpc. Low adoption (23 stars, 0 dependents) remains, though maintenance activity and release discipline are visibly stronger.matasarei/json-rpc repository the authoritative source for the fguillot/json-rpc Packagist entry, and are dist archives signed/verifiable? Which mode (client vs server) is in scope? Who owns patching if upstream stalls? What is the fallback (native Laravel HTTP client or alternate library)?JsonRpcClientInterface with a concrete adapter. Keep request construction, batch semantics, error-code translation, cookie handling, and response validation inside the adapter so domain code is insulated from the v1→v2 behaviour shifts.Expect-header behaviour assumptions in call sites.UPGRADE-2.0.md, inventory every parameter payload for coercion dependence, and build contract tests that assert both the strict -32602 case and the happy path. Exercise the new response-validation rules (id mismatch, non-answer JSON, batch partial failure) and the new exception split (ServerErrorException for non-RPC 500s) before promoting.matasarei vs fguillot relationship.2.x branch, adversarial review rounds, strict CI gates), which lowers — but does not remove — the chance of needing an internal fork or patch set. Pin exact versions, avoid spread of direct package calls, and budget for a v2 GA upgrade.Expect: 100-continue. Server mode still needs evaluation for concurrency, request-size limits, batch processing, rate limiting, and DoS exposure; if used, front it with Laravel middleware or a gateway.null), batch partial failures, JSON-RPC error-code ambiguity, version mismatch, auth expiry, TLS/proxy issues, and — new in v2 — strict-parameter -32602 rejections from previously tolerated callers. Map all of these into application-level exceptions, metrics, and runbooks.-32602 rates (proxy for coercion regressions), ServerErrorException vs relayed-error splits, and payload-size outliers. Log correlation ids without sensitive payloads.How can I help you explore Laravel packages today?