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

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

polymorphine/session
====================

HTTP Request session context service handled by PSR-15 middleware

0.1.5(1y ago)01021MITPHPPHP ^7.4 || ^8.0

Since Mar 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/polymorphine/session)[ Packagist](https://packagist.org/packages/polymorphine/session)[ RSS](/packages/polymorphine-session/feed)WikiDiscussions develop Synced 5d ago

READMEChangelog (6)Dependencies (5)Versions (7)Used By (1)

Polymorphine/Session
====================

[](#polymorphinesession)

[![Latest stable release](https://camo.githubusercontent.com/d978015a5265e422641728af5805b29ee5cb8786659cc897cb875a86be6c0c92/68747470733a2f2f706f7365722e707567782e6f72672f706f6c796d6f727068696e652f73657373696f6e2f76657273696f6e)](https://packagist.org/packages/polymorphine/session)[![Build status](https://github.com/polymorphine/session/workflows/build/badge.svg)](https://github.com/polymorphine/session/actions)[![Coverage status](https://camo.githubusercontent.com/5ad4ed2c389e7273d7818817e038efd3024931ebffacee04609d483022f606d6/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f706f6c796d6f727068696e652f73657373696f6e2f62616467652e7376673f6272616e63683d646576656c6f70)](https://coveralls.io/github/polymorphine/session?branch=develop)[![PHP version](https://camo.githubusercontent.com/7da85988aed5f90ba8851a8908fb1d7efc43bcf12b0c3beeb4ed0129493f6774/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f706f6c796d6f727068696e652f73657373696f6e2e737667)](https://packagist.org/packages/polymorphine/session)[![LICENSE](https://camo.githubusercontent.com/63e49cbe207f1ce77b0edcd9ab3c005269577c494db902b89ce1b66bf68f5580/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f706f6c796d6f727068696e652f73657373696f6e2e7376673f636f6c6f723d626c7565)](LICENSE)

### HTTP Request session context service handled by PSR-15 middleware

[](#http-request-session-context-service-handled-by-psr-15-middleware)

### Installation with [Composer](https://getcomposer.org/)

[](#installation-with-composer)

```
composer require polymorphine/session
```

### How it works?

[](#how-it-works)

In procedural code you would have to call `session_start()` to allow access to superglobal `$_SESSION` array. This library also requires initialisation phase, but it is achieved with ([PSR-15](https://www.php-fig.org/psr/psr-15/)) middleware. Request going through this middleware will trigger [`SessionContext`](src/SessionContext.php), and [`SessionStorage`](src/SessionStorage.php) will become available.

The session storage is not superglobal anymore, and it can be passed explicitly into objects that require access to its data. The downside is that it **cannot be instantiated directly *before request processing*** is started, so lazy initialisation is necessary one way or another.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance42

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

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

Recently: every ~225 days

Total

6

Last Release

473d ago

PHP version history (2 changes)0.1.0PHP ^7.4

0.1.1PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b83b30083b2ca0951558f0516ded598877c690f2be60cf949d9be3fdf0389ca?d=identicon)[shudd3r](/maintainers/shudd3r)

---

Top Contributors

[![shudd3r](https://avatars.githubusercontent.com/u/9908030?v=4)](https://github.com/shudd3r "shudd3r (52 commits)")

---

Tags

httppsr-15psr-7sessionsession-cookiesession-storage

### Embed Badge

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

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

###  Alternatives

[relay/relay

A PSR-15 server request handler.

3302.1M86](/packages/relay-relay)[mezzio/mezzio-authentication-oauth2

OAuth2 (server) authentication middleware for Mezzio and PSR-7 applications.

28483.0k2](/packages/mezzio-mezzio-authentication-oauth2)[openswoole/core

Openswoole core library

181.1M32](/packages/openswoole-core)[mezzio/mezzio-authentication

Authentication middleware for Mezzio and PSR-7 applications

121.6M26](/packages/mezzio-mezzio-authentication)[jimtools/jwt-auth

PSR-15 JWT Authentication middleware, A replacement for tuupola/slim-jwt-auth

20142.3k3](/packages/jimtools-jwt-auth)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)

PHPackages © 2026

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