PHPackages                             tobiassjosten/responsible-service-provider - 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. [Framework](/categories/framework)
4. /
5. tobiassjosten/responsible-service-provider

ActiveLibrary[Framework](/categories/framework)

tobiassjosten/responsible-service-provider
==========================================

A Silex ServiceProvider for automagic response formatting.

1.0.0(9y ago)3490.8k—7.1%6MITPHP

Since Aug 29Pushed 9y ago2 watchersCompare

[ Source](https://github.com/tobiassjosten/ResponsibleServiceProvider)[ Packagist](https://packagist.org/packages/tobiassjosten/responsible-service-provider)[ RSS](/packages/tobiassjosten-responsible-service-provider/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

ResponsibleServiceProvider
==========================

[](#responsibleserviceprovider)

A [Silex](http://silex.sensiolabs.org) ServiceProvider for automagic response formatting.

[![Build Status](https://camo.githubusercontent.com/b89e31aeebf843350c2a14f8e4386fa26c6c8b2474099293166e4a788d2795aa/68747470733a2f2f7472617669732d63692e6f72672f746f62696173736a6f7374656e2f526573706f6e7369626c655365727669636550726f76696465722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/tobiassjosten/ResponsibleServiceProvider)

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

[](#installation)

1. Add the package to you composer.json:

    $ composer require tobiassjosten/responsible-service-provider

(For Silex 1, add the *0.0.1* version to the end of that commend.)

2. Register it in your application.

    $app-&gt;register(new \\Tobiassjosten\\Silex\\ResponsibleServiceProvider());

Usage
-----

[](#usage)

Once enabled, just have your controllers return data as an array. `ResponsibleServiceProvider` will do the rest.

```
$app->get('/foo', function () {
    return ['Bar'];
});

```

In JSON:

```
$ curl -I -H 'Accept: application/json' http://example.com/foo
HTTP/1.1 200 OK
Date: Tue, 07 May 2013 08:30:58 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.4.9-4ubuntu2
Cache-Control: no-cache
Transfer-Encoding: chunked
Content-Type: application/json

["Bar"]

```

And in XML:

```
$ curl -I -H 'Accept: application/xml' http://example.com/foo
HTTP/1.1 200 OK
Date: Tue, 07 May 2013 08:30:58 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.4.9-4ubuntu2
Cache-Control: no-cache
Transfer-Encoding: chunked
Content-Type: application/xml

Bar

```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 60% 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 ~23 days

Total

2

Last Release

3520d ago

Major Versions

0.0.1 → 1.0.02016-09-22

### Community

Maintainers

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

---

Top Contributors

[![tobiassjosten](https://avatars.githubusercontent.com/u/65159?v=4)](https://github.com/tobiassjosten "tobiassjosten (15 commits)")[![KEIII](https://avatars.githubusercontent.com/u/1167833?v=4)](https://github.com/KEIII "KEIII (6 commits)")[![pgodel](https://avatars.githubusercontent.com/u/18968?v=4)](https://github.com/pgodel "pgodel (2 commits)")[![giggsey](https://avatars.githubusercontent.com/u/305730?v=4)](https://github.com/giggsey "giggsey (1 commits)")[![GromNaN](https://avatars.githubusercontent.com/u/400034?v=4)](https://github.com/GromNaN "GromNaN (1 commits)")

---

Tags

phpsilexservice providersilex

### Embed Badge

![Health badge](/badges/tobiassjosten-responsible-service-provider/health.svg)

```
[![Health](https://phpackages.com/badges/tobiassjosten-responsible-service-provider/health.svg)](https://phpackages.com/packages/tobiassjosten-responsible-service-provider)
```

###  Alternatives

[ddesrosiers/silex-annotation-provider

A silex service provider that allows the use of annotations in ServiceControllers.

25246.7k3](/packages/ddesrosiers-silex-annotation-provider)[propel/propel-service-provider

Propel integrationfor Silex.

2625.2k3](/packages/propel-propel-service-provider)

PHPackages © 2026

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