PHPackages                             kamyshev/responder-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. kamyshev/responder-bundle

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

kamyshev/responder-bundle
=========================

A Symfony Bundle to easy handling returning any type from controllers and transforming it to Response

v1.0.1(7y ago)03.3kMITPHPPHP ^7.1

Since Aug 10Pushed 7y ago1 watchersCompare

[ Source](https://github.com/igorkamyshev/ResponderBundle)[ Packagist](https://packagist.org/packages/kamyshev/responder-bundle)[ RSS](/packages/kamyshev-responder-bundle/feed)WikiDiscussions master Synced 1mo ago

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

[![Build Status](https://camo.githubusercontent.com/334d050ef8c2a69af1bf589cf2cb2c4ed62b0c79abef16b47509d82f88822b8c/68747470733a2f2f7472617669732d63692e6f72672f69676f726b616d79736865762f526573706f6e64657242756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/igorkamyshev/ResponderBundle)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/68c8ebe9fab5ad8458dcc66931295a8f454b171bddcab1d3439119c9226ba896/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f69676f726b616d79736865762f526573706f6e64657242756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/igorkamyshev/ResponderBundle/?branch=master)

ResponderBundle
===============

[](#responderbundle)

> A Symfony Bundle to easy handling returning any type from controllers and transforming it to Response

Setup
-----

[](#setup)

To add this package to your composer.json and install it execute the following command:

```
composer require kamyshev/responder-bundle

```

Add ResponderBundle to your application

```
// config/bundles.php
return [
    // ...
    Kamyshev\ResponderBundle\ResponderBundle::class => ['all' => true],
    // ...
];

```

Usage
-----

[](#usage)

Adding a new responder requires creating a class that implements ResponderInterface and defining a service for it. The interface defines two methods:

- `supports()` — This method is used to check whether the responder supports the given argument. make() will only be executed when this returns true.
- `make()` — This method will create the actual response for the argument.

Both methods get the Result object, which was be returned from controller, and an ResultMetadata instance. This object contains all information retrieved from the method signature for the current argument.

Now that you know what to do, you can implement this interface. Return `User` from controller action and:

```
// src/Responder/UserResponder.php
namespace App\Responder;

use App\Entity\User;
use Symfony\Component\HttpFoundation\Response;
use Kamyshev\ResponderBundle\Responder\ResponderInterface;
use Kamyshev\ResponderBundle\Responder\ResultMetadata;

class UserResponder implements ResponderInterface
{
    public function supports($user, ResultMetadata $meta): bool
    {
        return User::class === $meta->getType();
    }

    public function make($user, ResultMetadata $meta): Response
    {
        return new Response($user->getName());
    }
}

```

That's it! Now all you have to do is add the configuration for the service container. This can be done by tagging the service with `kamyshev.responder`.

```
# config/services.yaml
services:
    _defaults:
        # ... be sure autowiring is enabled
        autowire: true
    # ...

    App\Responder\UserResponder:
        tags: ['kamyshev.responder']

```

All done! You can return User from controller and handle it in Responder.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Every ~97 days

Total

2

Last Release

2731d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb826bf7775f0574a417b011442f33dd0ec6c593ac2a10b7c7402520a5e4eaa4?d=identicon)[igor.kamyshev](/maintainers/igor.kamyshev)

---

Top Contributors

[![igorkamyshev](https://avatars.githubusercontent.com/u/26767722?v=4)](https://github.com/igorkamyshev "igorkamyshev (14 commits)")

---

Tags

responsemiddlewaresymfony

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kamyshev-responder-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/kamyshev-responder-bundle/health.svg)](https://phpackages.com/packages/kamyshev-responder-bundle)
```

###  Alternatives

[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k48.1M234](/packages/api-platform-core)[fresh/centrifugo-bundle

Provides communication with web-socket server Centrifugo in Symfony applications.

83375.3k](/packages/fresh-centrifugo-bundle)[middlewares/response-time

Middleware to save the response time into the X-Response-Time header

14278.7k4](/packages/middlewares-response-time)

PHPackages © 2026

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