PHPackages                             duncan3dc/sessions - 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. duncan3dc/sessions

ActiveLibrary

duncan3dc/sessions
==================

A non-blocking session manager

3.1.0(4mo ago)27227.0k↓34.1%98Apache-2.0PHPPHP ^8.1CI passing

Since Jul 19Pushed 4mo ago2 watchersCompare

[ Source](https://github.com/duncan3dc/sessions)[ Packagist](https://packagist.org/packages/duncan3dc/sessions)[ Docs](https://github.com/duncan3dc/sessions)[ RSS](/packages/duncan3dc-sessions/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (16)Versions (13)Used By (8)

sessions
========

[](#sessions)

A non-blocking session handler for PHP

Full documentation is available at
PHPDoc API documentation is also available at [http://duncan3dc.github.io/sessions/api/](http://duncan3dc.github.io/sessions/api/namespaces/duncan3dc.Sessions.html)

[![release](https://camo.githubusercontent.com/5c48326303c26a84f5ac6865dbd026436ef92e90623cd178caa9254b74a4b350/68747470733a2f2f706f7365722e707567782e6f72672f64756e63616e3364632f73657373696f6e732f76657273696f6e2e737667)](https://packagist.org/packages/duncan3dc/sessions)[![build](https://camo.githubusercontent.com/5776948ae5b1e31f0c427f308be38ef5df4b10507290a0b41606d7e3e28bb686/68747470733a2f2f7472617669732d63692e6f72672f64756e63616e3364632f73657373696f6e732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/duncan3dc/sessions)[![coverage](https://camo.githubusercontent.com/91e3c5dfaecd430d4172443bf7c4a55701a9139fdd5334c94dfa1a8de02b29a8/68747470733a2f2f636f6465636f762e696f2f67682f64756e63616e3364632f73657373696f6e732f67726170682f62616467652e737667)](https://codecov.io/gh/duncan3dc/sessions)

Quick Examples
--------------

[](#quick-examples)

```
$session = new \duncan3dc\Sessions\SessionInstance("my-app");
$session->set("current-status", 4);
$currentStatus = $session->get("current-status");
```

Avoid common key clashes:

```
$session->set("user", "Mark");

$backend = $session->createNamespace("backend");
$backend->set("user", "Caroline");

$session->get("user"); # "Mark"
$backend->get("user"); # "Caroline"
```

Store one-time flash messages:

```
$session->setFlash("message", "Your profile has been updated");

$session->getFlash("message"); # "Your profile has been updated";

$session->getFlash("message"); # null;
```

There is also a static class you can use with all the features above:

```
use \duncan3dc\Sessions\Session;
Session::name("my-app");

Session::set("current-status", 4);
$currentStatus = Session::get("current-status");
```

*Read more at *

Changelog
---------

[](#changelog)

A [Changelog](CHANGELOG.md) has been available since the beginning of time

Where to get help
-----------------

[](#where-to-get-help)

Found a bug? Got a question? Just not sure how something works?
Please [create an issue](//github.com/duncan3dc/sessions/issues) and I'll do my best to help out.
Alternatively you can catch me on [Twitter](https://twitter.com/duncan3dc)

duncan3dc/sessions for enterprise
---------------------------------

[](#duncan3dcsessions-for-enterprise)

Available as part of the Tidelift Subscription

The maintainers of duncan3dc/sessions and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-duncan3dc-sessions?utm_source=packagist-duncan3dc-sessions&utm_medium=referral&utm_campaign=readme)

###  Health Score

61

—

FairBetter than 99% of packages

Maintenance77

Regular maintenance activity

Popularity46

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 94.4% 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 ~425 days

Recently: every ~707 days

Total

10

Last Release

126d ago

Major Versions

1.4.0 → 2.0.02018-04-15

2.1.0 → 3.0.02025-05-13

PHP version history (6 changes)1.0.0PHP &gt;=5.6.0

1.1.0PHP ^5.6|^7.0

2.0.0PHP ^7.1

2.0.1PHP ^7.2

2.1.0PHP ^7.4 || ^8.0

3.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/11dc66042513f11d1c99b1e6763f25dca84a3ff31cdbea3972b9b804a3d3d5e9?d=identicon)[duncan3dc](/maintainers/duncan3dc)

---

Top Contributors

[![duncan3dc](https://avatars.githubusercontent.com/u/546811?v=4)](https://github.com/duncan3dc "duncan3dc (102 commits)")[![tflori](https://avatars.githubusercontent.com/u/4855611?v=4)](https://github.com/tflori "tflori (2 commits)")[![GDIBass](https://avatars.githubusercontent.com/u/11201326?v=4)](https://github.com/GDIBass "GDIBass (1 commits)")[![michalbundyra](https://avatars.githubusercontent.com/u/7423207?v=4)](https://github.com/michalbundyra "michalbundyra (1 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")[![subins2000](https://avatars.githubusercontent.com/u/2305675?v=4)](https://github.com/subins2000 "subins2000 (1 commits)")

---

Tags

phpsessionnon-blockingsession

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/duncan3dc-sessions/health.svg)

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

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[thecodingmachine/graphqlite

Write your GraphQL queries in simple to write controllers (using webonyx/graphql-php).

5723.1M30](/packages/thecodingmachine-graphqlite)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[neos/flow-development-collection

Flow packages in a joined repository for pull requests.

144179.3k3](/packages/neos-flow-development-collection)[windwalker/framework

The next generation PHP framework.

25639.1k1](/packages/windwalker-framework)[selective/samesite-cookie

Secure your site with SameSite cookies

10144.0k](/packages/selective-samesite-cookie)

PHPackages © 2026

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