Full guide to the JsonRpc Server Bundle. Chapters are written to be read top-to-bottom on first contact, then referenced individually.
| # | Chapter | What it covers |
|---|---|---|
| 01 | Getting started | Install, register the bundle, first handler, first call |
| 02 | Methods | #[Rpc\Method], __invoke, return types, batch, notifications, deprecation |
| 03 | Parameters & DTOs | DTO denormalization, #[Rpc\Param], RpcParams, positional vs named, dates |
| 04 | Security & roles | roles, RoleMatch, security-core integration, redaction |
| 05 | Caching | #[Rpc\Cache], scopes, pools, tags, RpcCacheInvalidator |
| 06 | Rate limiting | #[Rpc\RateLimit], four policies, three scopes, Retry-After |
| 07 | Streaming | #[Rpc\Stream], NDJSON / SSE / JSON-array, mid-stream errors |
| 08 | MCP | Tool listing, invoke, formats (incl. TOON), filter, transformer |
| 09 | OpenRPC | Generate the spec, integrate with SDK generators |
| 10 | Errors | Exception hierarchy, JSON-RPC codes, custom server errors |
| 11 | Observability | Events, profiler, PSR-3 logging, Sentry, OpenTelemetry |
| 12 | CLI & maker | debug:rpc, rpc:cache:clear, make:rpc-method |
| 13 | Configuration reference | Every YAML knob with defaults and recommendations |
| 14 | Context | The Context object, request id propagation |
Russian translation is in docs/ru/.
composer require knetesin/json-rpc-server always refers to the bundle.App\… is your application namespace.yaml are valid Symfony config (place under
config/packages/json_rpc_server.yaml).{ "jsonrpc": "2.0", "method": "…", "params": …, "id": 1 }
The docs render as a GitHub Pages site
served from this docs/ folder. Local preview:
gem install bundler jekyll
cd docs && bundle install && bundle exec jekyll serve