PHPackages                             marko/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. [Framework](/categories/framework)
4. /
5. marko/session

ActiveMarko-module[Framework](/categories/framework)

marko/session
=============

Session interfaces and infrastructure for Marko Framework

0.7.0(4w ago)0269↑36.4%7MITPHPPHP ^8.5

Since Mar 25Pushed 4w agoCompare

[ Source](https://github.com/marko-php/marko-session)[ Packagist](https://packagist.org/packages/marko/session)[ RSS](/packages/marko-session/feed)WikiDiscussions develop Synced 3w ago

READMEChangelogDependencies (10)Versions (18)Used By (7)

marko/session
=============

[](#markosession)

Session interfaces and infrastructure--defines session management, flash messages, and garbage collection without coupling to a storage backend.

Installation
------------

[](#installation)

```
composer require marko/session
```

Note: You also need a driver package. See `marko/session-file` or `marko/session-database`.

Quick Example
-------------

[](#quick-example)

```
use Marko\Session\Contracts\SessionInterface;

public function __construct(
    private readonly SessionInterface $session,
) {}

public function handle(): void
{
    $this->session->start();
    $this->session->set('user_id', 42);
    $this->session->flash()->add('success', 'Profile updated.');
    $this->session->save();
}
```

Documentation
-------------

[](#documentation)

Full usage, API reference, and examples: [marko/session](https://marko.build/docs/packages/session/)

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance94

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.5% 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 ~4 days

Recently: every ~15 days

Total

16

Last Release

28d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/437029?v=4)[Mark Shust](/maintainers/markshust)[@markshust](https://github.com/markshust)

---

Top Contributors

[![markshust](https://avatars.githubusercontent.com/u/437029?v=4)](https://github.com/markshust "markshust (21 commits)")[![michalbiarda](https://avatars.githubusercontent.com/u/1135380?v=4)](https://github.com/michalbiarda "michalbiarda (1 commits)")

###  Code Quality

TestsPest

### Embed Badge

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

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

PHPackages © 2026

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