PHPackages                             ufo-tech/rest-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. [HTTP &amp; Networking](/categories/http)
4. /
5. ufo-tech/rest-bundle

ActiveSymfony-bundle[HTTP &amp; Networking](/categories/http)

ufo-tech/rest-bundle
====================

REST API bundle for building RESTful services in the UFO-Tech ecosystem.

1.0.0(4mo ago)01MITPHPPHP ^8.3

Since Feb 23Pushed 4mo agoCompare

[ Source](https://github.com/UFO-Tech/rest-bundle)[ Packagist](https://packagist.org/packages/ufo-tech/rest-bundle)[ Docs](https://github.com/UFO-Tech/rest-bundle)[ RSS](/packages/ufo-tech-rest-bundle/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (7)Versions (2)Used By (0)

🚀 RpcMercureTransport
=====================

[](#-rpcmercuretransport)

[![Ukraine](https://camo.githubusercontent.com/2fb547f29aac6dd78e67a73710de72477a056922508da517981e1149c7d96e4e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f476c6f72792d556b7261696e652d79656c6c6f773f6c6162656c436f6c6f723d626c7565)](https://camo.githubusercontent.com/2fb547f29aac6dd78e67a73710de72477a056922508da517981e1149c7d96e4e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f476c6f72792d556b7261696e652d79656c6c6f773f6c6162656c436f6c6f723d626c7565)

**REST bundle for building RESTful services in the UFO-Tech ecosystem**

Provides infrastructure for building REST APIs with a unified routing model, access control, and integration across UFO-Tech services.

---

🧬 Idea
------

[](#-idea)

This is an extension for [JSON-RPC-BUNDLE](https://github.com/ufo-tech/json-rpc-bundle) that allows exposing a REST API based on the existing RPC infrastructure without additional configuration.

It enables fast deployment of an API layer only for the methods that must be available in the public API.

---

[![License](https://camo.githubusercontent.com/5f10cda952d684cb9142391c760fff757740755bff79ec52769d1650f80165bb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e3f6c6162656c436f6c6f723d376238313835)](https://camo.githubusercontent.com/5f10cda952d684cb9142391c760fff757740755bff79ec52769d1650f80165bb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e3f6c6162656c436f6c6f723d376238313835)[![Size](https://camo.githubusercontent.com/b4c26e3d004bf173616c5f6ffaf07e4e99b5b902c008ab3c8142b6fd7f1d0a9d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f75666f2d746563682f7270632d726573742d616461707465723f6c6162656c3d53697a652532306f662532307468652532307265706f7369746f7279)](https://camo.githubusercontent.com/b4c26e3d004bf173616c5f6ffaf07e4e99b5b902c008ab3c8142b6fd7f1d0a9d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f75666f2d746563682f7270632d726573742d616461707465723f6c6162656c3d53697a652532306f662532307468652532307265706f7369746f7279)[![package_version](https://camo.githubusercontent.com/df99fb6306267c2521d067a49e0c209ba43f8dd2852ee98a60d50224f4cc4b2c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f75666f2d746563682f7270632d726573742d616461707465723f636f6c6f723d626c7565266c6162656c3d4c617465737425323056657273696f6e266c6f676f3d5061636b6167697374266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d376238313835)](https://camo.githubusercontent.com/df99fb6306267c2521d067a49e0c209ba43f8dd2852ee98a60d50224f4cc4b2c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f75666f2d746563682f7270632d726573742d616461707465723f636f6c6f723d626c7565266c6162656c3d4c617465737425323056657273696f6e266c6f676f3d5061636b6167697374266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d376238313835)[![fork](https://camo.githubusercontent.com/e1c01114978ec6d9bd457ad07d16d251dd8f74de361a591d9c19b0b066be5675/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f75666f2d746563682f7270632d726573742d616461707465723f636f6c6f723d677265656e266c6f676f3d676974687562267374796c653d666c6174)](https://camo.githubusercontent.com/e1c01114978ec6d9bd457ad07d16d251dd8f74de361a591d9c19b0b066be5675/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f75666f2d746563682f7270632d726573742d616461707465723f636f6c6f723d677265656e266c6f676f3d676974687562267374796c653d666c6174)

### Environment Requirements

[](#environment-requirements)

[![php_version](https://camo.githubusercontent.com/13570c50472c194a0e0e11fa6aa53d8b1fc73f6d5fa48d35b9cc7278056e68f9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f75666f2d746563682f7270632d726573742d616461707465722f7068703f6c6f676f3d504850266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/13570c50472c194a0e0e11fa6aa53d8b1fc73f6d5fa48d35b9cc7278056e68f9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f75666f2d746563682f7270632d726573742d616461707465722f7068703f6c6f676f3d504850266c6f676f436f6c6f723d7768697465)[![ufo-tech/rpc-bundle](https://camo.githubusercontent.com/8877e00751b5fb4c3292cbc56cbdfebbf71f72a319349e9e8e0b3da18efd1e78/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f75666f2d746563682f7270632d726573742d616461707465722f75666f2d746563682f6a736f6e2d7270632d62756e646c653f6c6162656c3d4a736f6e52706342756e646c65266c6f676f3d75666f266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/8877e00751b5fb4c3292cbc56cbdfebbf71f72a319349e9e8e0b3da18efd1e78/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f75666f2d746563682f7270632d726573742d616461707465722f75666f2d746563682f6a736f6e2d7270632d62756e646c653f6c6162656c3d4a736f6e52706342756e646c65266c6f676f3d75666f266c6f676f436f6c6f723d7768697465)

⚙️ Installation
---------------

[](#️-installation)

```
composer require ufo-tech/rpc-rest-adapter
```

---

🚦 Quick Start
-------------

[](#-quick-start)

After installation, the adapter automatically registers a single REST entry point that proxies requests to RPC methods.

By default, the following endpoint is used:

```
/rest/{path}

```

where `{path}` is the RPC route (service/method).

---

📡 Request Example
-----------------

[](#-request-example)

RPC method:

```
user.getList

```

REST request:

```
GET /rest/users/

```

POST request with parameters:

```
POST /rest/user/getList
{
  "page": 1,
  "limit": 20
}
```

---

⚙️ How it works
---------------

[](#️-how-it-works)

The adapter:

- receives an HTTP REST request
- transforms it into a JSON-RPC call
- forwards it to JsonRpcBundle
- returns a standard JSON response

No additional configuration is required. It is enough to add the `#[Route]` attribute to RPC services that must be available via the REST endpoint.

```
use Ufo\RpcObject\RPC;
use Symfony\Component\Routing\Attribute\Route;

#[RPC\Info(alias: 'User')]
#[Route('/users', name: 'users')]
class UserProcedure implements IRpcService
{
    #[Route('/', name: 'create', methods: ['POST'])]
    public function create(
        #[RPC\Assertions([
            new Assert\NotBlank(),
        ])]
        string $role,
        #[RPC\Assertions([
            new Assert\NotBlank(),
            new Assert\Regex(
                pattern: '/^\+380\d{9}$/', message: 'The phone number is not a valid UA mobile number'
            ),
        ])]
        string $phone,
        #[RPC\Assertions([
            new Assert\NotBlank(),
            new Assert\Length(min: 3),
        ])]
        string $firstName,
        #[RPC\Assertions([
            new Assert\NotBlank(),
            new Assert\Length(min: 3),
        ])]
        string $lastName,
    ): string
    {
        // create user
    }

    #[Route('/{userId}', name: 'update', methods: ['PUT'])]
    public function update(
        #[RPC\Assertions([
            new Assert\NotBlank(),
            new Assert\Uuid(),
        ])]
        string $userId,
        #[RPC\Assertions([
            new Assert\NotBlank(),
            new Assert\Length(min: 3),
        ])]
        string $firstName,
        #[RPC\Assertions([
            new Assert\NotBlank(),
            new Assert\Length(min: 3),
        ])]
        string $lastName,
    ): string
    {
        // update user
    }
}
```

---

🔐 Public API
------------

[](#-public-api)

To expose methods in the public REST layer, the standard JsonRpcBundle access configuration is used, therefore the access control fully mirrors the RPC layer.

🦠 License
---------

[](#-license)

MIT © [UFO-Tech](https://github.com/ufo-tech)

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance76

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

129d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/87aea0bcf81c64ced7c3a14a1746d603ec6e8acfba62ef85746df40e8c376e7f?d=identicon)[Alex Maistrenko](/maintainers/Alex%20Maistrenko)

---

Top Contributors

[![Ashterix](https://avatars.githubusercontent.com/u/5172394?v=4)](https://github.com/Ashterix "Ashterix (1 commits)")

---

Tags

apirestrpcadaptertransportufo-tech

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ufo-tech-rest-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ufo-tech-rest-bundle/health.svg)](https://phpackages.com/packages/ufo-tech-rest-bundle)
```

###  Alternatives

[symfony/http-kernel

Provides a structured process for converting a Request into a Response

8.1k869.4M8.8k](/packages/symfony-http-kernel)[lexik/jwt-authentication-bundle

This bundle provides JWT authentication for your Symfony REST API

2.6k62.6M257](/packages/lexik-jwt-authentication-bundle)[bitrix24/b24phpsdk

An official PHP library for the Bitrix24 REST API

10244.2k5](/packages/bitrix24-b24phpsdk)[tilleuls/forgot-password-bundle

Provides a 'forgot password' feature for a REST API

85579.5k1](/packages/tilleuls-forgot-password-bundle)[cypresslab/patch-manager

A library to manage patch requests

16128.9k](/packages/cypresslab-patch-manager)[bilyiv/request-data-bundle

Represents request data in a structured and useful way.

202.6k](/packages/bilyiv-request-data-bundle)

PHPackages © 2026

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