PHPackages                             nofw/session-handlers - 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. [Database &amp; ORM](/categories/database)
4. /
5. nofw/session-handlers

ActiveLibrary[Database &amp; ORM](/categories/database)

nofw/session-handlers
=====================

Package providing various SessionHandlerInterface implementations

v0.2.0(9y ago)024MITPHPPHP ^7.0

Since Apr 15Pushed 9y ago1 watchersCompare

[ Source](https://github.com/nofw/session-handlers)[ Packagist](https://packagist.org/packages/nofw/session-handlers)[ Docs](https://github.com/nofw)[ RSS](/packages/nofw-session-handlers/feed)WikiDiscussions master Synced yesterday

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

Session handlers
================

[](#session-handlers)

[![Latest Version](https://camo.githubusercontent.com/45735b0052c9a26abdb6e245eaeecf8125dbe710b2217c8b5fd14a9aeae5abf3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6e6f66772f73657373696f6e2d68616e646c6572732e7376673f7374796c653d666c61742d737175617265)](https://github.com/nofw/session-handlers/releases)[![Build Status](https://camo.githubusercontent.com/34c960e5cb895a2df1cddcb9988fcff67f08684c61c86a66a1f5715f9c9ff32e/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6e6f66772f73657373696f6e2d68616e646c6572732e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/nofw/session-handlers)[![Code Coverage](https://camo.githubusercontent.com/94970e3151261978e19406efa267e6bcaf4d2706e979c11e4cfb02f207faeaff/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6e6f66772f73657373696f6e2d68616e646c6572732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/nofw/session-handlers)[![Quality Score](https://camo.githubusercontent.com/cdd195d45eaf5edbb2e3ad0b415edcb13fcc1b742ea280e801ffc5afd1e3fb0a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6e6f66772f73657373696f6e2d68616e646c6572732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/nofw/session-handlers)[![Total Downloads](https://camo.githubusercontent.com/58ac203b490e1ac387a4ce96feef115e224f7904d61b7d772af6e91f55cae136/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e6f66772f73657373696f6e2d68616e646c6572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nofw/session-handlers)

**Package providing various `SessionHandlerInterface` implementations.**

Install
-------

[](#install)

Via Composer

```
$ composer require nofw/session-handlers
```

Usage
-----

[](#usage)

This package provides three Session Handler implementations:

- PSR-6
- PSR-16
- Doctrine Cache

Choose your backend and instantiate and register handler.

```
$cache = new ImaginaryCacheItemPool();
$handler = new \Nofw\Session\CacheSessionHandler($cache);

session_set_save_handler($handler);
```

Use your session as usual.

### Logging

[](#logging)

The [SessionHandlerInterface](http://php.net/manual/en/class.sessionhandlerinterface.php) does not allow throwing exceptions to indicate failure. Instead it expects the handler to return empty values (empty string or false). However, the PSR-X implementations do throw exceptions. To adhere the interface and to not lose the ability to detect failures, these implementations accept a PSR-3 logger as their second constructor argument and also implement the `LoggerAwareInterface`.

```
$cache = new ImaginaryCacheItemPool();
$logger = new Monolog\Logger('nofw')
$handler = new \Nofw\Session\CacheSessionHandler($cache, $logger);
```

The caught exceptions are logged as errors.

Testing
-------

[](#testing)

```
$ make test
```

Security
--------

[](#security)

If you discover any security related issues, please contact us at .

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Total

2

Last Release

3360d ago

PHP version history (2 changes)v0.1.0PHP ^5.6 || ^7.0

v0.2.0PHP ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e4e105cea62b616d4cb376b08a849b6a428f646998537de150d16a8eb537b90?d=identicon)[mark.sagikazar](/maintainers/mark.sagikazar)

---

Top Contributors

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

---

Tags

handlerphpsessionhandlersession

### Embed Badge

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

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

###  Alternatives

[symfony/cache

Provides extended PSR-6, PSR-16 (and tags) implementations

4.2k373.5M3.1k](/packages/symfony-cache)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[kimai/kimai

Kimai - Time Tracking

4.8k8.7k1](/packages/kimai-kimai)[cycle/database

DBAL, schema introspection, migration and pagination

70777.8k49](/packages/cycle-database)[api-platform/metadata

API Resource-oriented metadata attributes and factories

275.0M198](/packages/api-platform-metadata)[symfony/ai-store

Low-level abstraction for storing and retrieving documents in a vector store.

21400.9k86](/packages/symfony-ai-store)

PHPackages © 2026

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