PHPackages                             marko/session-database - 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-database

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

marko/session-database
======================

Database session driver for Marko Framework

0.8.5(1mo ago)087↓65%MITPHPPHP ^8.5

Since Mar 25Pushed 2w agoCompare

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

READMEChangelogDependencies (18)Versions (24)Used By (0)

marko/session-database
======================

[](#markosession-database)

Database session driver — stores session data in a SQL table for shared access across multiple application servers.

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

[](#installation)

```
composer require marko/session-database
```

Requires `marko/database` for the database connection.

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

[](#quick-example)

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

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

public function handle(): void
{
    $this->session->set('user_id', 42);
}
```

Installing this package automatically registers the database handler, binds `SessionInterface`, and adds `SessionMiddleware` globally. No manual configuration is needed.

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

[](#documentation)

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

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance94

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

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

Total

22

Last Release

46d 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 (8 commits)")

###  Code Quality

TestsPest

### Embed Badge

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

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

###  Alternatives

[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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