PHPackages                             phalcon/incubator-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. phalcon/incubator-session

ActiveLibrary[Framework](/categories/framework)

phalcon/incubator-session
=========================

Phalcon Incubator Sessions Adapters

v3.0.0(6mo ago)6291.8k↑25%8BSD-3-ClausePHPPHP &gt;=8.1CI passing

Since Jun 18Pushed 1mo ago5 watchersCompare

[ Source](https://github.com/phalcon/incubator-session)[ Packagist](https://packagist.org/packages/phalcon/incubator-session)[ Docs](https://phalcon.io)[ GitHub Sponsors](https://github.com/phalcon)[ Fund](https://opencollective.com/phalcon)[ RSS](/packages/phalcon-incubator-session/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (6)Versions (11)Used By (0)

Phalcon Session Extra Adapters
==============================

[](#phalcon-session-extra-adapters)

[![Discord](https://camo.githubusercontent.com/28c6fc95b5decf0e67719a5438501589c00b2db2b15228e67479d6548bbc9f6b/68747470733a2f2f696d672e736869656c64732e696f2f646973636f72642f3331303931303438383135323337353239373f6c6162656c3d446973636f7264)](http://phalcon.io/discord)[![Packagist Version](https://camo.githubusercontent.com/2e5d849ecd131f9e73f86081b6078ccc6a07db22de70eef68e4914f61b7fdbac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068616c636f6e2f696e63756261746f722d73657373696f6e)](https://packagist.org/packages/phalcon/incubator-session)[![PHP from Packagist](https://camo.githubusercontent.com/8c8ec74aac7f10fa87d65e489daff301626a955f6e6da770ef78c53c0bb11675/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7068616c636f6e2f696e63756261746f722d73657373696f6e)](https://packagist.org/packages/phalcon/incubator-session)[![codecov](https://camo.githubusercontent.com/fbf778aa97a21a66f552fd2bfd332ccea56e16529ba2b8b9c98fad221645efc7/68747470733a2f2f636f6465636f762e696f2f67682f7068616c636f6e2f696e63756261746f722d73657373696f6e2f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/phalcon/incubator-session)[![Packagist](https://camo.githubusercontent.com/467b1dbb5d011adc330641c13f302e11fe427894bec399a99e941b5d33c2377d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64642f7068616c636f6e2f696e63756261746f722d73657373696f6e)](https://packagist.org/packages/phalcon/incubator-session/stats)

Issues tracker
--------------

[](#issues-tracker)

Database
--------

[](#database)

This adapter uses a database backend to store session data:

```
use Phalcon\Db\Adapter\Pdo\Mysql;
use Phalcon\Incubator\Session\Adapter\Database;

$di->set('session', function () {
    // Create a connection
    $connection = new Mysql([
        'host'     => 'localhost',
        'username' => 'root',
        'password' => 'secret',
        'dbname'   => 'test',
    ]);

    $session = new Database($connection, 'session_data');
    $session->start();

    return $session;
});
```

This adapter uses the following table to store the data:

```
 CREATE TABLE `session_data` (
  `session_id` VARCHAR(35) NOT NULL,
  `data` text NOT NULL,
  `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `modified_at` TIMESTAMP NULL DEFAULT NULL,
  PRIMARY KEY (`session_id`)
);
```

Upgrading from phalcon/incubator 3.4 will require changes to the session\_data table:

```
ALTER TABLE session_data MODIFY COLUMN created_at TIMESTAMP DEFAULT current_timestamp() NOT NULL;
ALTER TABLE session_data MODIFY COLUMN modified_at TIMESTAMP DEFAULT NULL NULL;

```

Mongo
-----

[](#mongo)

Install PHP MongoDB Extension via pecl:

```
pecl install mongodb
```

After install, add the following line to your `php.ini` file:

```
extension=mongodb.so

```

This adapter uses a Mongo database backend to store session data:

```
use Phalcon\Incubator\Session\Adapter\Mongo as MongoSession;

$di->set('session', function () {
    // Create a connection to mongo
    $mongo = new \MongoDB\Client(
        'mongodb+srv://:@/test?retryWrites=true&w=majority'
    );

    // Passing a collection to the adapter
    $session = new MongoSession([
        'collection' => $mongo->test->session_data,
    ]);
    $session->start();

    return $session;
});
```

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance80

Actively maintained with recent releases

Popularity41

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 91.1% 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 ~247 days

Recently: every ~448 days

Total

9

Last Release

184d ago

Major Versions

v1.1.4 → v2.x-dev2021-10-03

v2.0.0 → v3.0.02025-11-15

PHP version history (3 changes)v1.0.0PHP &gt;=7.2

v2.0.0PHP &gt;=7.4

v3.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/d5ff591be4c323fa518af7afa942b4b1423ce4bd3991e9d9b3fc1b3878cfea75?d=identicon)[Jeckerson](/maintainers/Jeckerson)

---

Top Contributors

[![Jeckerson](https://avatars.githubusercontent.com/u/3289702?v=4)](https://github.com/Jeckerson "Jeckerson (102 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![Caffe1neAdd1ct](https://avatars.githubusercontent.com/u/1327332?v=4)](https://github.com/Caffe1neAdd1ct "Caffe1neAdd1ct (1 commits)")[![niden](https://avatars.githubusercontent.com/u/1073784?v=4)](https://github.com/niden "niden (1 commits)")

---

Tags

databasemongodbphalconsessionframeworksessionphalconincubator

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[phalcon/incubator

Adapters, prototypes or functionality that can be potentially incorporated to the C-framework.

7222.9M81](/packages/phalcon-incubator)[phalcon/devtools

This tools provide you useful scripts to generate code helping to develop faster and easy applications that use with Phalcon framework.

1.3k2.0M54](/packages/phalcon-devtools)[phalcon/migrations

Run and Generate DB Migrations with Phalcon Framework

29977.8k6](/packages/phalcon-migrations)[phalcon/incubator-mailer

Phalcon Incubator Mailer Adapters

1318.1k2](/packages/phalcon-incubator-mailer)

PHPackages © 2026

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