PHPackages                             bankiru/rpc-server-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. bankiru/rpc-server-bundle

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

bankiru/rpc-server-bundle
=========================

RPC server symfony bundle

1.2(9y ago)117.7k1[1 issues](https://github.com/bankiru/rpc-server-bundle/issues)[1 PRs](https://github.com/bankiru/rpc-server-bundle/pulls)1MITPHPPHP ~5.5 || ~7.0

Since Apr 18Pushed 3y ago3 watchersCompare

[ Source](https://github.com/bankiru/rpc-server-bundle)[ Packagist](https://packagist.org/packages/bankiru/rpc-server-bundle)[ RSS](/packages/bankiru-rpc-server-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (11)Versions (6)Used By (1)

[![Latest Stable Version](https://camo.githubusercontent.com/4ce4cc920994ab69d97519a68fae564257ac8a5159df328765d6fe70dc4dac98/68747470733a2f2f706f7365722e707567782e6f72672f62616e6b6972752f7270632d7365727665722d62756e646c652f762f737461626c65)](https://packagist.org/packages/bankiru/rpc-server-bundle)[![Total Downloads](https://camo.githubusercontent.com/7dc1e2343297c92eab91278e547ae49907cd63b07f965d9bc5dbe76bb2b99da6/68747470733a2f2f706f7365722e707567782e6f72672f62616e6b6972752f7270632d7365727665722d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/bankiru/rpc-server-bundle)[![Latest Unstable Version](https://camo.githubusercontent.com/574cbc24c18c0cc56ad9b4184923c24666a440a8b89cc7344b53d293cb1cf1e6/68747470733a2f2f706f7365722e707567782e6f72672f62616e6b6972752f7270632d7365727665722d62756e646c652f762f756e737461626c65)](https://packagist.org/packages/bankiru/rpc-server-bundle)[![License](https://camo.githubusercontent.com/a80bb4e55ead23ccce206fa83da8737f91b6be986aa87f3730aa9e911a7d4629/68747470733a2f2f706f7365722e707567782e6f72672f62616e6b6972752f7270632d7365727665722d62756e646c652f6c6963656e7365)](https://packagist.org/packages/bankiru/rpc-server-bundle)

[![Build Status](https://camo.githubusercontent.com/9bb6a17d92d7989452a3b395142470692d4f05654905cb54436191789cb4ac08/68747470733a2f2f7472617669732d63692e6f72672f62616e6b6972752f7270632d7365727665722d62756e646c652e737667)](https://travis-ci.org/bankiru/rpc-server-bundle)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/efa8da720b5f21c5e1b0367f801ff135bbb23b4d19ca54afba8aa2b2c691ca8c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62616e6b6972752f7270632d7365727665722d62756e646c652f6261646765732f7175616c6974792d73636f72652e706e67)](https://scrutinizer-ci.com/g/bankiru/rpc-server-bundle/)[![Code Coverage](https://camo.githubusercontent.com/f4e8ef0608ea4d5146839c6570226d99933724156918da92c11592a0e320d3dc/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62616e6b6972752f7270632d7365727665722d62756e646c652f6261646765732f636f7665726167652e706e67)](https://scrutinizer-ci.com/g/bankiru/rpc-server-bundle/)[![SensioLabsInsight](https://camo.githubusercontent.com/6046d02a081814c7a1caa529546ae10d10b2f39d22ecd9e067aa6f544ee71d1d/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f35336239386632352d366230382d343362322d396562652d6532643833653137623836382f6d696e692e706e67)](https://insight.sensiolabs.com/projects/53b98f25-6b08-43b2-9ebe-e2d83e17b868)

HTTP RPC Server bundle
======================

[](#http-rpc-server-bundle)

This bundle provides default controller realisation to handle RPC requests which come to the application via HTTP requests

Implementations
---------------

[](#implementations)

RPC server does not declares any implementation requirements. Some could be

- JSON-RPC
- SOAP (extends XML-RPC)

or other custom RPC which operates with method+parameters and utilizes single endpoint for several methods

HTTP Endpoints
--------------

[](#http-endpoints)

Endpoint is a HTTP route which process basic HTTP request, providing initial parsing and processing request data

To enable HTTP endpoint you should enable custom endpoint router loader via the following router configuration:

```
# app/config/routing.yml
rpc:
  resource: .
  type: endpoint
```

Resource value is not important, it is ignored when loading routes as the endpoints are configured vua config

### Configuration

[](#configuration)

Basic endpoint configuration looks like

```
rpc:
  router:
    endpoints:
      my-public-endpoint:
        path: /
        defaults:
          _controller: JsonRpcBundle:JsonRpc:jsonRpc
          _format: json
        context: Default
        resources:
        - "@MyBundle/Resources/config/service_rpc.yml"
```

This creates endpoint on URL / with generic symfony controller. Also it pre-populates the methods from the `service_rpc.yml` config file

`my-public-endpoint` will become a route name, so make sure it does not overlap with other routes until you want it do to this.

### Method routing

[](#method-routing)

Each RPC request has method and parameters. You can configure the application to handle different methods within different endpoints with different actions

Generic configuration looks like

```
my_bundle:
  resource: "@MyBundle/Rpc/"
  prefix: my_bundle/
  type: annotation
```

Different resource types are supported. Built-in are

#### Annotation

[](#annotation)

```
@Method("my-bundle/my-method", context={"private"}, defaultContext=false)
```

#### Yaml

[](#yaml)

Different endpoint implementation may utilize different controller name parsers, so `MyBundle:Test:entity` notation is endpoint-dependent. I.e JSON-RPC may search `TestController`controller in `MyBundle\JsonRpc\TestController`

```
my-bundle/my-method:
  controller: "MyBundle:Test:entity"
  default_context: true
  context: private
```

#### Resource

[](#resource)

You can pass directory, class, file, yaml config as method source with prefix and context inheritance

The following chaing will result in `prefix/annotation/sub` method handled by `AnnotationController::subAction` with `private`+`default` context

```
private:
  resource: jsonrpc_private_nested.yml
  context: private
```

```
annotation:
  resource: "@JsonRpcTestBundle/JsonRpc"
  prefix: prefix/
```

```
/**
 * Class AnnotationController
 *
 * @package Bankiru\Api\JsonRpc\Test\JsonRpc
 * @Method("annotation/")
 */
class AnnotationController extends Controller
{
    /**
     * @return array
     * @Method("sub")
     */
    public function subAction()
    {
        return [];
    }
}
```

Events
------

[](#events)

This bundle repeats the generic symfony request processing flow. You can hook your extension into given system events

- `rpc.request` is triggered on handling RPC call
    - Routing happens here
- `rpc.controller` is triggered to filter controller (i.e. allows security filtering)
- `rpc.response` is triggered whenever response is acquired by the endpoint processor
- `rpc.view` is triggered if response, returned from controller is not instance of `RpcResponseInterface`
- `rpc.exception` is triggered when exception is raised during RPC call processing
- `rpc.finish_request` is used to finalize RPC response before it is returned to HTTP controller

RPC Controller implementation
-----------------------------

[](#rpc-controller-implementation)

The goal of implementing controller is to extend abstract `RpcController` passing `RequestInterface` and endpoint name into `getResponse` method.

`RequestInterface` is an extension of `RpcRequestInterface` with extra attributes allowing request metadata carrying alongside the request.

The generic solution is to convert incoming symfony `Request` instance into your own implementation of `RequestInterface` (i.e extract method and args from XML-RPC or JSON-RPC requests) and send serialized response back, transforming `RpcResponseInterface` back to your response object.

You can also automatically convert `RpcResponseInterface` into your serialized response via generic symfony view event processing

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~36 days

Total

3

Last Release

3601d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ed906771163ff68cfb365bdd3b8278a3ce1b464f94051ff7ab50c03a30110efe?d=identicon)[scaytrase](/maintainers/scaytrase)

---

Top Contributors

[![scaytrase](https://avatars.githubusercontent.com/u/6578413?v=4)](https://github.com/scaytrase "scaytrase (6 commits)")[![hanovruslan](https://avatars.githubusercontent.com/u/1153520?v=4)](https://github.com/hanovruslan "hanovruslan (1 commits)")

---

Tags

apiapi-serverbundlerpcsymfony

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bankiru-rpc-server-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/bankiru-rpc-server-bundle/health.svg)](https://phpackages.com/packages/bankiru-rpc-server-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
