PHPackages                             shellphy/slim4-response - 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. shellphy/slim4-response

ActiveLibrary[HTTP &amp; Networking](/categories/http)

shellphy/slim4-response
=======================

v1.0.1(2y ago)018PHP

Since Aug 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/shellphy/slim4-response)[ Packagist](https://packagist.org/packages/shellphy/slim4-response)[ RSS](/packages/shellphy-slim4-response/feed)WikiDiscussions master Synced today

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

用法
==

[](#用法)

Import Package：

```
composer require "shellphy/slim4-response"
```

Usage：

```
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use Shellphy\Slim4Response\SlimBootstrapper;

$app = SlimBootstrapper::bootstrap();

$app->get('/', function (Request $request, Response $response, $args) {
    $response->getBody()->write("hello, world");
    return $response;
});

$app->get('/error', function (Request $request, Response $response, $args) {
    throw new \Exception("error", 400);
});
```

If you request GET /, response this:

```
{
    "code": 0,
    "msg": "success",
    "data": "hello, world"
}
```

If you request GET /error, response this:

```
{
    "code": 400,
    "msg": "error",
    "data": null
}
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Total

2

Last Release

1055d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12596198?v=4)[shellphy](/maintainers/shellphy)[@shellphy](https://github.com/shellphy)

---

Top Contributors

[![shellphy](https://avatars.githubusercontent.com/u/12596198?v=4)](https://github.com/shellphy "shellphy (3 commits)")

### Embed Badge

![Health badge](/badges/shellphy-slim4-response/health.svg)

```
[![Health](https://phpackages.com/badges/shellphy-slim4-response/health.svg)](https://phpackages.com/packages/shellphy-slim4-response)
```

###  Alternatives

[oat-sa/tao-core

TAO core extension

66143.7k121](/packages/oat-sa-tao-core)[phlak/directory-lister

PHP directory lister

2.5k1.4k](/packages/phlak-directory-lister)[palanik/corsslim

Cross-origin resource sharing (CORS) middleware for PHP Slim.

94385.6k3](/packages/palanik-corsslim)[egroupware/openid

EGroupware OpenID Connect / OAuth2 server

1228.1k4](/packages/egroupware-openid)[mhndev/slim-file-response

Slim File Response

122.6k](/packages/mhndev-slim-file-response)

PHPackages © 2026

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