PHPackages                             khanhicetea/psr7-session - 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. khanhicetea/psr7-session

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

khanhicetea/psr7-session
========================

PSR7 Session Middleware

1.1.0(9y ago)318MITPHPPHP ^7.0

Since May 3Pushed 9y ago1 watchersCompare

[ Source](https://github.com/khanhicetea/psr7-session)[ Packagist](https://packagist.org/packages/khanhicetea/psr7-session)[ RSS](/packages/khanhicetea-psr7-session/feed)WikiDiscussions master Synced 2w ago

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

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

[](#installation)

```
composer require "khanhicetea/psr7-session"

```

Get Started
-----------

[](#get-started)

It's built on top Symfony HTTP Foundation, so you can use **Symfony SessionHandler** excepts **NativeSessionHandler**

This demo below is use **RedisHandler**

```
$redis = new \Redis();
$redis->connect('redis_server', 6379, 3);
$redis_handler = new \Psr7Session\Handler\RedisHandler($redis, 3600);

$middleware = SessionMiddleware::create()
            ->name('I_am_cookie_plz_dont_eat_me')
            ->httpOnly()
            ->maxAge(3600)
            ->handler($redis_handler);

$slim_app->add($middleware);
```

Use **Session** object

```
use Psr7Session\Middleware as SessionMiddleware;

$session = SessionMiddleware::getSession($request);
$default = 123;
$value = $session->get('key', $default);
$value++;
$session->set('key', $value);
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

3345d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7813bb37bdbd56acf5eb3e1fdcbe1f31c34fcb16134a1538ee7d7b6b9d2825af?d=identicon)[khanhicetea](/maintainers/khanhicetea)

---

Top Contributors

[![khanhicetea](https://avatars.githubusercontent.com/u/4528223?v=4)](https://github.com/khanhicetea "khanhicetea (2 commits)")

### Embed Badge

![Health badge](/badges/khanhicetea-psr7-session/health.svg)

```
[![Health](https://phpackages.com/badges/khanhicetea-psr7-session/health.svg)](https://phpackages.com/packages/khanhicetea-psr7-session)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.1B3.8k](/packages/guzzlehttp-psr7)[symfony/http-kernel

Provides a structured process for converting a Request into a Response

8.1k853.6M8.3k](/packages/symfony-http-kernel)[symfony/psr-http-message-bridge

PSR HTTP message bridge

1.3k312.3M932](/packages/symfony-psr-http-message-bridge)[api-platform/core

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

2.6k50.1M314](/packages/api-platform-core)[moonshine/moonshine

Laravel administration panel

1.3k239.9k76](/packages/moonshine-moonshine)[spatie/laravel-export

Create a static site bundle from a Laravel app

672139.5k6](/packages/spatie-laravel-export)

PHPackages © 2026

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