Search by

ufo-tech / json-rpc-bundle

Alex MaistrenkoValchik

The bundle for easy using json-rpc api on your project

Package info

github.com/UFO-Tech/json-rpc-bundle

Homepage

Type:symfony-bundle

pkg:composer/ufo-tech/json-rpc-bundle

Statistics

Installs: 5 291

Dependents: 5

Suggesters: 0

Stars: 5

Open Issues: 0

10.4.4 2026-10-19 17:34 UTC

README

Ukraine

Українська

JSON-RPC 2.0 server for Symfony 7.2+ / 8 (PHP 8.4+).

Creating RPC services for service-oriented architecture on Symfony has never been so easy.

License Size package_version fork php_version symfony_version

composer require ufo-tech/json-rpc-bundle

Key features

  • Any service becomes an API. Implement IRpcService and its public methods are JSON-RPC 2.0 methods on one endpoint — 4.5
  • Self-documenting. GET /rpc returns OpenRPC, GET /rpc/postman a Postman collection; schemas come from native types, PHPDoc, DTOs, enums and validation constraints; titles and descriptions are translated by Accept-Language (also per API group) and cached with ETag — 6.4, 7.3, 9.0, 10.3, 10.4
  • API versions side by side. /rpc, /rpc/v2 with #[RPC\Info('user', version: 2, removedMethods: [...])]; each version inherits the previous one — 10.0
  • Several APIs in one application. Public, internal and BFF entry points via #[RPC\APIGroups], each with its own methods, versions, docs and token validation — 10.2
  • Batch with dependencies. Pass one call's result into another with @FROM:<id>(<field>); run items inline (fast) or in parallel child processes with a limit — 4.5, 10.3
  • Notifications and callbacks. Requests without id get 204 and run after the response; $rpc.callback posts the result to a webhook — 9.2, 10.1, 10.3
  • Validation. Symfony constraints on parameters with #[RPC\Assertions], one error listing every invalid parameter — 5.2, 10.1
  • Automatic parameter conversion. DTOs, enums, dates, UUIDs and Doctrine entities by id from the method signature — 8.0, 10.0
  • Caching and locks. #[RPC\Cache] per parameters, #[RPC\CacheRelation] invalidation, #[RPC\Lock] against concurrent calls, shared cache pool via cache.pool — 6.4, 7.4, 7.6, 10.3
  • Async and security. Symfony Messenger transports, one token model for HTTP, CLI and async, event hooks around every call — 7.0, 8.0, 9.1

Release notes

All versions with what was added and how to use it: releases. Latest: 10.4.

Documentation

Installation, configuration and usage: JsonRpcBundle documentation on ufo-tech.space.

UFO-Tech

ufo-tech.space is the home of UFO-Tech libraries: documentation and integration guides, articles on PHP, Symfony, JSON-RPC, APIs and service architecture, practical notes and case studies.