PHPackages                             pioniro/request-response-model-converter-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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. pioniro/request-response-model-converter-bundle

ActiveSymfony-bundle[Parsing &amp; Serialization](/categories/parsing)

pioniro/request-response-model-converter-bundle
===============================================

Serializes and unserializes your request and response models

1.0.1(6y ago)01941MITPHPPHP ^7.1

Since Apr 3Pushed 6y ago1 watchersCompare

[ Source](https://github.com/pioniro/requestResponseModelConverterBundle)[ Packagist](https://packagist.org/packages/pioniro/request-response-model-converter-bundle)[ RSS](/packages/pioniro-request-response-model-converter-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (7)Versions (6)Used By (0)

The request and response models converter bundle
================================================

[](#the-request-and-response-models-converter-bundle)

This is a bundle, that does this magic:

*before:*

```
// Controller/MyAwfulController.php
namespace App\Controller;

use \Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;

class MyAwfulController extends AbstractController
{
    public function sum(Request $request)
    {
        if($request->isMethod('POST')) {
            $a = $request->request->getDigits('a');
            $b = $request->request->getDigits('b');
        } else {
            $a = $request->query->getDigits('a');
            $b = $request->query->getDigits('b');
        }
        if(is_null($a) || is_null($b)) {
            throw new RuntimeException('a and b should not be null');
        }
        return new JsonResponse(['result' => floatval($a) + floatval($b)]);
    }
}
```

Or using the forms. Awful, isn't it?

*after:*

```
// Model\Request\SumRequest.php
namespace App\Model\Request;

use JMS\Serializer\Annotation as Serializer;
use Pioniro\RequestResponseModel\RequestModelInterface;
use Symfony\Component\Validator\Constraints as Assert;

class SumRequest implements RequestModelInterface
{
    /**
    * @var float
    * @Serializer\Type("float")
    * @Assert\NotNull()
    */
    protected $a;

    /**
    * @var float
    * @Serializer\Type("float")
    * @Assert\NotNull()
    */
    protected $b;

    public function getA(): float
    {
        return $this->a;
    }

    public function getB(): float
    {
        return $this->b;
    }

}
// Model\Request\ResultResponse.php
namespace App\Model\Response;

use JMS\Serializer\Annotation as Serializer;
use Pioniro\RequestResponseModel\RequestModelInterface;
use Pioniro\RequestResponseModel\ResponseModelInterface;
use Symfony\Component\Validator\Constraints as Assert;

class ResultResponse implements ResponseModelInterface
{
    /**
    * @var float
    * @Serializer\Type("float")
    */
    protected $result;

    public function __construct(float $result) {
        $this->result = $result;
    }
}

// Controller/MyAwesomeController.php
namespace App\Controller;

use \Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;

class MyAwesomeController extends AbstractController
{
    public function sum(SumRequest $request)
    {
        return new ResultResponse($request->getA() + $request->getB());
    }
}
```

Did you see this? No manual validation, no manual model filling, no working with exception, no badly testable Response! Just your logic.

That's why this bundle is.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.4% 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 ~0 days

Total

5

Last Release

2227d ago

Major Versions

0.0.3 → 1.0.02020-04-03

### Community

Maintainers

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

---

Top Contributors

[![pioniro](https://avatars.githubusercontent.com/u/6437567?v=4)](https://github.com/pioniro "pioniro (5 commits)")[![Petrdis](https://avatars.githubusercontent.com/u/23390012?v=4)](https://github.com/Petrdis "Petrdis (2 commits)")

### Embed Badge

![Health badge](/badges/pioniro-request-response-model-converter-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/pioniro-request-response-model-converter-bundle/health.svg)](https://phpackages.com/packages/pioniro-request-response-model-converter-bundle)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[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)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)[shopware/storefront

Storefront for Shopware

684.2M148](/packages/shopware-storefront)

PHPackages © 2026

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