PHPackages                             paysera/lib-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. paysera/lib-rest-bundle

Abandoned → [paysera/lib-api-bundle](/?search=paysera%2Flib-api-bundle)Library

paysera/lib-rest-bundle
=======================

Helps easily convert your regular controller to RESTful controller

5.2.0(2mo ago)325.9k↓100%122PHPPHP &gt;=7.4CI passing

Since Dec 15Pushed 2mo ago7 watchersCompare

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

READMEChangelog (10)Dependencies (12)Versions (39)Used By (2)

PayseraRestBundle [![](https://camo.githubusercontent.com/90c8ca6b28343fade97cf46bb2055a71b3b8ec8a2e6d6d9de9dc16e73bebbec5/68747470733a2f2f7472617669732d63692e6f72672f706179736572612f6c69622d726573742d62756e646c652e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/90c8ca6b28343fade97cf46bb2055a71b3b8ec8a2e6d6d9de9dc16e73bebbec5/68747470733a2f2f7472617669732d63692e6f72672f706179736572612f6c69622d726573742d62756e646c652e7376673f6272616e63683d6d6173746572)
===============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#payserarestbundle-)

> **Deprecated**, use  instead.

This bundle provides means for rapid API development.

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

[](#installation)

- Download bundle: `composer require paysera/lib-rest-bundle`
- Enable bundle:

```
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Paysera\Bundle\RestBundle\PayseraRestBundle(),
        );

        // ...
    }
}
```

Configuration
-------------

[](#configuration)

- Example of the full bundle configuration

```
paysera_rest:
    property_path_converter: 'my_custom_path_converter' # Overrides the default path converter
    locales: ['en', 'ru', 'lt'] # Optional list of accepted locales
```

Basic Usage
-----------

[](#basic-usage)

- Create and configure your controller:

```
class ApiController
{

    public function saveData(Data $data)
    {
        ...
        return new CustomResponseEntity();
    }
}
```

```

    ...

```

- Create API service:

```

```

- Configure your routing and add `api_key`:

```

    app_bundle.controller.api_controller:saveData
    my_custom_api_key

```

- Optionally, add request and response mappers to your API service:

```

        app_bundle.normalizer.data
        app_bundle.controller.api_controller:saveData
        data

        app_bundle.normalizer.custom_response
        app_bundle.controller.api_controller:saveData

```

Here `app_bundle.normalizer.data` is a service implementing `\Paysera\Component\Serializer\Normalizer\DenormalizerInterface`, `app_bundle.normalizer.custom_response` is a service implementing `\Paysera\Component\Serializer\Normalizer\NormalizerInterface`. Both of these services must be configured as public in their service definitions.

Testing
=======

[](#testing)

php7.4
------

[](#php74)

```
docker build -t lib-rest7.4 -f docker/Dockerfile_PHP7.4 .
docker run -it -u $UID -v $PWD:/app -w /app lib-rest7.4 composer i
docker run -it -u $UID -v $PWD:/app -w /app lib-rest7.4 bin/phpunit

```

php8.0
------

[](#php80)

```
docker build -t lib-rest8.0 -f docker/Dockerfile_PHP8.0 .
docker run -it -u $UID -v $PWD:/app -w /app lib-rest8.0 composer i
docker run -it -u $UID -v $PWD:/app -w /app lib-rest8.0 bin/phpunit

```

debugging
=========

[](#debugging)

php7.4
------

[](#php74-1)

```
docker run --add-host=host.docker.internal:host-gateway -e XDEBUG_MODE=debug -it -u $UID -v $PWD:/app -w /app lib-rest7.4 ...

```

php8.0
------

[](#php80-1)

```
docker run --add-host=host.docker.internal:host-gateway -e XDEBUG_MODE=debug -it -u $UID -v $PWD:/app -w /app lib-rest8.0 ...

```

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance89

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~90 days

Recently: every ~369 days

Total

38

Last Release

89d ago

Major Versions

1.5.0 → 2.0.02017-08-25

2.1.0 → 3.0.02017-09-22

3.0.3 → 4.0.02018-04-05

4.4.1 → 5.0.02020-02-25

PHP version history (6 changes)1.0.0PHP &gt;=5.3.3

1.3.0PHP &gt;=5.5

4.4.0PHP ^7.0

5.0.4PHP ^7.1 || ^8.0

5.1.0PHP ^7.4 || ^8.0

5.1.1PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d385187c2b529d5c1189dfc3763972f76738d24293593ff3db876fff82321db?d=identicon)[paysera.com](/maintainers/paysera.com)

---

Top Contributors

[![vbartusevicius](https://avatars.githubusercontent.com/u/7325630?v=4)](https://github.com/vbartusevicius "vbartusevicius (17 commits)")[![mateusz-kaczmarek-paysera](https://avatars.githubusercontent.com/u/141825950?v=4)](https://github.com/mateusz-kaczmarek-paysera "mateusz-kaczmarek-paysera (8 commits)")[![andriisobolatpaysera](https://avatars.githubusercontent.com/u/160000584?v=4)](https://github.com/andriisobolatpaysera "andriisobolatpaysera (7 commits)")[![mSprunskas](https://avatars.githubusercontent.com/u/4427922?v=4)](https://github.com/mSprunskas "mSprunskas (5 commits)")[![alexanderzaiets-paysera](https://avatars.githubusercontent.com/u/101864629?v=4)](https://github.com/alexanderzaiets-paysera "alexanderzaiets-paysera (4 commits)")[![tomas7777](https://avatars.githubusercontent.com/u/9091359?v=4)](https://github.com/tomas7777 "tomas7777 (3 commits)")[![asteisiunas](https://avatars.githubusercontent.com/u/28863584?v=4)](https://github.com/asteisiunas "asteisiunas (1 commits)")[![tomasliubinas](https://avatars.githubusercontent.com/u/1522729?v=4)](https://github.com/tomasliubinas "tomasliubinas (1 commits)")[![desislavaggeorgieva](https://avatars.githubusercontent.com/u/69151016?v=4)](https://github.com/desislavaggeorgieva "desislavaggeorgieva (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/paysera-lib-rest-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/paysera-lib-rest-bundle/health.svg)](https://phpackages.com/packages/paysera-lib-rest-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)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)[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)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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