PHPackages                             bistro/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. bistro/session

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bistro/session
==============

A session abstraction library

0.1.0(13y ago)58321MITPHPPHP &gt;=5.3

Since Feb 20Pushed 13y ago1 watchersCompare

[ Source](https://github.com/Bistro/session)[ Packagist](https://packagist.org/packages/bistro/session)[ RSS](/packages/bistro-session/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)Used By (1)

Bistro: Session
===============

[](#bistro-session)

A Session library for PHP 5.3+. Allows different storage engines to be used.

Engines
-------

[](#engines)

2 Storage engines are included in the library.

### Native

[](#native)

This driver uses the php native `$_SESSION` array to handle the session data.

```
$session = new \Bistro\Session\Native;

$timeout = $session->get('timeout');

if ($timeout === null)
{
	$session->set('timeout', time() + 43200);
}
```

### MockArray

[](#mockarray)

There is also a MockArray storage engine to help with unit testing session data. The MockArray session doesn't save state across "requests".

```
$data = array(
	'test' => "Session data",
	'goes' => "Here"
)

$session = new \Bistro\Session\MockArray($data);

$session->has('test'); // true
$missing = $session->get('missing'); // null
```

Storage Interface
-----------------

[](#storage-interface)

Check `\Bistro\Session\Session` for all of the public methods that are available to a session storage engine.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

4880d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/46fa0decb95ad8d80b65e1fbed54f3fa9ee6350f1c8a0f83335221a201effb59?d=identicon)[davewid](/maintainers/davewid)

---

Top Contributors

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

---

Tags

sessionbistro

### Embed Badge

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

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

###  Alternatives

[laminas/laminas-session

Object-oriented interface to PHP sessions and storage

8524.2M132](/packages/laminas-laminas-session)[bryanjhv/slim-session

Session middleware and helper for Slim framework 4.

2411.0M16](/packages/bryanjhv-slim-session)[plasticbrain/php-flash-messages

A modern take on PHP session-based flash messages

184229.8k8](/packages/plasticbrain-php-flash-messages)[rairlie/laravel-locking-session

Provide session locking in Laravel

92486.9k1](/packages/rairlie-laravel-locking-session)[vcian/pulse-active-sessions

A Laravel Pulse card to show active user session.

11582.7k](/packages/vcian-pulse-active-sessions)[odan/session

A Slim session handler

64222.9k24](/packages/odan-session)

PHPackages © 2026

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