PHPackages                             groton-school/session-cookie-middleware - 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. groton-school/session-cookie-middleware

ActiveLibrary

groton-school/session-cookie-middleware
=======================================

Implementation of PSR-15 middleware to manage session cookies with CHIPS partition support

00[1 PRs](https://github.com/groton-school/session-cookie-middleware/pulls)PHPCI passing

Since Oct 8Pushed 3mo agoCompare

[ Source](https://github.com/groton-school/session-cookie-middleware)[ Packagist](https://packagist.org/packages/groton-school/session-cookie-middleware)[ RSS](/packages/groton-school-session-cookie-middleware/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

groton-school/session-cookie-middleware
=======================================

[](#groton-schoolsession-cookie-middleware)

Implementation of PSR-15 middleware to manage session cookies with CHIPS partition support

[![Latest Version](https://camo.githubusercontent.com/4101aa23d0ca9d802d4e459f556dda7b78aae3c86926d872646b3ae8408cd8cf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67726f746f6e2d7363686f6f6c2f73657373696f6e2d636f6f6b69652d6d6964646c65776172652e737667)](https://packagist.org/packages/groton-school/session-cookie-middleware)

Install
-------

[](#install)

composer require groton-school/session-cookie-middleware

Use
---

[](#use)

In `app/dependencies.php`:

```
use DI;
use GrotonSchool\Session\Session;
use Odan\Session\SessionInterface;
use Odan\Session\SessionManagerInterface;

return function (ContainerBuilder $containerBuilder) {
    $containerBuilder->addDefinitions([

        // ...other dependencies...

        Session::class => function(ContainerInterface $container) {
            return new Session([
                'name' => 'session-cookie',
                'lifetime' => 86400,
                'path' => '/',
                'secure' => true,
                'httponly' => true,
                'partitioned' => false
            ]);
        },
        SessionInterface::class => DI\get(Session::class),
        SessionManagerInterface::class => DI\get(Session::class)
    ])
}
```

Either in `app/routes.php`:

```
use GrotonSchool\Session\SessionCookieMiddleware;

// ...

$app->get('/route/that/needs/session', SomeAction::class)
  ->add(SessionCookieMiddleware::class);
```

...or in `app/middleware.php`:

```
use GrotonSchool\Session\SessionCookieMiddleware;

// ...

$app->add(SessionCookieMiddleware::class);
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance57

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/groton-school-session-cookie-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/groton-school-session-cookie-middleware/health.svg)](https://phpackages.com/packages/groton-school-session-cookie-middleware)
```

PHPackages © 2026

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