PHPackages                             insidestyles/json-rpc-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. insidestyles/json-rpc-bundle

ActiveSymfony-bundle[API Development](/categories/api)

insidestyles/json-rpc-bundle
============================

A simple and fast way to create json rpc server api as microservice. Json Rpc 2.0 Bundle

v3.0.0(3y ago)2497MITPHPPHP &gt;=8.1

Since Apr 14Pushed 3y ago1 watchersCompare

[ Source](https://github.com/insidestyles/json-rpc-bundle)[ Packagist](https://packagist.org/packages/insidestyles/json-rpc-bundle)[ RSS](/packages/insidestyles-json-rpc-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (10)Versions (9)Used By (0)

json-rpc-bundle
===============

[](#json-rpc-bundle)

Symfony Json Rpc Bundle Fast way to create json rpc microservice, using symfony messenger and laminas json server

- Json Rpc 2.0
- Batch Support

Requirements
------------

[](#requirements)

```
    "php": ">=8.0",
    "ext-json": "*",
    "symfony/framework-bundle": "^5.3" || ^6.0,
    "laminas/laminas-json-server": "^3.1"

```

Installation
------------

[](#installation)

This package is installable and autoloadable via Composer

```
composer require insidestyles/json-rpc-bundle
```

Add package config: json\_rpc\_api.yaml

```
json_rpc_api:
    handlers:
        main:
            path: /api
            host: ~
            serializer: ~
            context: ~
            logger: ~
            error_handler: ~
```

Add Bundle to App

```
    Insidestyles\JsonRpcBundle\JsonRpcBundle::class => ['all' => true],
```

Add route config: json\_rpc\_api\_routing.yaml

```
_json_rpc_api:
  resource: .
  type: json_rpc_api
```

Usage
-----

[](#usage)

- Add Example HelloWorldApi

Update api interface with JsonRpcApi Annotation

@JsonRpcApi(namespace = "main")

```
