felixfbecker/advanced-json-rpc
JSON-RPC 2.0 request/response helpers with a Dispatcher that decodes JSON-RPC calls and invokes target methods. Automatically coerces parameter types using type hints and @param docs, and supports nested targets via configurable method delimiters.
Architecture fit: The package provides a pure JSON-RPC implementation that aligns with Laravel's API-centric architecture but requires manual integration. It doesn't leverage Laravel's built-in routing, middleware, or dependency injection natively, creating a layer of abstraction between the framework and RPC logic. Best suited for dedicated RPC endpoints where strict protocol compliance is required, but not ideal for standard RESTful API development.
Integration feasibility: Low to moderate. Requires creating a custom controller to handle raw JSON requests, manually converting Laravel's Request to the package's expected format, and wiring up service targets. No Laravel-specific service provider or facade exists, adding boilerplate code. The Dispatcher must be instantiated per-request, which conflicts with Laravel's container-managed lifecycle.
Technical risk: High. Last release was 3 years ago (2021), with no activity since. Zero Packagist dependents indicate minimal community usage. Dependencies (e.g., netresearch/jsonmapper) haven't been updated in years, risking compatibility with modern PHP 8.2+ and Laravel 10+. Security vulnerabilities in the package or its dependencies may go unaddressed.
Key questions:
webonyx/graphql-php for GraphQL, or Laravel's native API resources for REST) that better align with our stack?Stack fit: Poor. Laravel's HTTP layer (PSR-7 middleware, route groups, middleware pipelines) is bypassed entirely. No seamless integration with Laravel's authentication, validation, or exception handling. Requires custom middleware to wrap the package's dispatcher, defeating Laravel's built-in capabilities. Would fragment API development across multiple paradigms (REST + RPC) in the same project.
Migration path: High friction. Existing REST endpoints would need to be duplicated or refactored into RPC-style handlers. Clients would require protocol changes. No automated migration tools exist; manual conversion of all API calls would be error-prone. Best suited for greenfield RPC projects, not existing Laravel apps.
Compatibility: Limited. While the package supports PHP 7.1+/8.0+, its dependencies (e.g., phpdocumentor/reflection-docblock) may conflict with newer Laravel versions (e.g., Laravel 10+ uses symfony/finder v6+ which has known issues with older reflection libraries). No tests confirm compatibility with PHP 8.2+ or Laravel 10.
Sequencing:
JsonRpcController that manually processes Request body → dispatches → returns response./rpc endpoint.Maintenance: High ongoing burden due to no recent updates (last release 2021). Team would need to fork the package, backport security fixes, and manually resolve dependency conflicts. Documentation is sparse for edge cases (e.g., nested target edge cases), increasing troubleshooting time.
Support: Minimal community support (0 dependents, no recent issues/PRs). If critical bugs arise, no official patches or vendor support exists. Reliance on internal expertise for fixes will delay resolutions.
Scaling: Lightweight core logic, but manual integration in Laravel could introduce bottlenecks under high load (e.g., repeated Dispatcher instantiation per request without pooling). No built-in rate limiting or circuit breakers—requires custom implementation.
Failure modes: Dependency conflicts (e.g., jsonmapper incompatibility with PHP 8.2+) could cause silent failures. Unhandled exceptions from misconfigured targets may expose stack traces. Security vulnerabilities in outdated dependencies (e.g., phpdocumentor/reflection-docblock) could be exploited without patches.
Ramp-up: Steep learning curve for teams unfamiliar with reflection-based parameter coercion. Developers must manually handle error responses and serialization—no Laravel-native tooling. Onboarding requires deep dive into legacy code patterns with limited modern examples.
How can I help you explore Laravel packages today?