- How do I install avto-dev/json-rpc-laravel in a Laravel application?
- Install it with Composer by running composer require avto-dev/json-rpc-laravel. Then follow the package README to publish any configuration and register your RPC methods and HTTP endpoint. Laravel package discovery should handle the service provider if the package declares it, but confirm that in the README for your installed version.
- Which Laravel and PHP versions does json-rpc-laravel support?
- As of v2.8.0, the package supports Laravel 11, 12, and 13, with Laravel 11.0 as the minimum. PHP 8.2 or newer is effectively required through Laravel 11, and the release signals PHP 8.5 support. Always confirm the exact Composer PHP constraint in the package composer.json for the version you install.
- How do I register a JSON-RPC method with a controller action?
- In v2.8.0, RpcRouter::on() accepts a controller-action array such as [SomeController::class, 'method']. That aligns RPC registration with normal Laravel controller dispatch and dependency injection. Existing closure or string-based handlers may still be supported, but you should confirm in the docs and add contract tests before converting routes.
- Can I use Laravel middleware, validation, and authentication with JSON-RPC methods?
- The package is designed to validate parameters and handle middleware around JSON-RPC endpoints. When you register controller actions, dispatch goes through Laravel's container and middleware path like a normal controller. Test authorization, validation, and exception behavior for each registration style because the exact contract can vary.
- How do I call a remote JSON-RPC service from Laravel?
- The package provides a framework-native client API for calling remote JSON-RPC services from your Laravel app. Use the README to identify the client class and configuration options for your version. Add timeouts, retries, and error mapping in your own service layer so remote failures do not leak into controllers.
- Is avto-dev/json-rpc-laravel compatible with Laravel 10?
- No, v2.8.0 requires Laravel 11.0 or newer, so Laravel 10 applications are blocked unless they upgrade Laravel or pin an older package release. Inventory your Laravel and PHP versions before adopting v2.8.0. If you must stay on Laravel 10, choose the last compatible package version and plan the platform upgrade separately.
- What breaking changes are in json-rpc-laravel v2.8.0?
- The primary breaking change in v2.8.0 is the minimum Laravel version moving to 11.0. Controller-action support in RpcRouter::on() can affect route resolution, middleware, authorization, dependency injection, and exception handling, so treat it as a behavior change to test. PHPUnit and PHPStan version bumps are mainly CI concerns but can break pinned pipelines. Check the changelog and confirm whether Laravel 13 support is stable or pre-release before production rollout.
- How should I test an upgrade to json-rpc-laravel v2.8.0?
- Start by baselining existing RPC behavior and tests, then upgrade Laravel and PHP if needed before installing v2.8.0 in a branch. Review the Composer lock diff and run full RPC contract tests covering auth, middleware, validation, and error handling. Pilot one controller-action route in a non-critical service before rolling out by service.
- Does json-rpc-laravel work in production and how is it maintained?
- For Laravel 11+ teams, ongoing maintenance is relatively low, and active releases are a positive maintenance signal. The raised minimum Laravel version does create an upgrade cadence, so monitor maintainer responsiveness, security patching, and documentation quality. No material runtime scaling change is indicated because controller actions use the same Laravel container and middleware path.
- Is avto-dev/json-rpc-laravel a good fit for a Laravel 11 API?
- It is best suited to Laravel 11+ services that need to expose JSON-RPC endpoints and want controller-based dispatch to fit existing routing, dependency injection, and middleware conventions. Teams already on Laravel 11 or 12 should see low-to-moderate integration effort. Applications on Laravel 10 or older PHP versions need a platform upgrade plan or should pin the last compatible release.