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

ActiveLibrary

laasti/sessions
===============

v0.1.2(9y ago)0148[1 issues](https://github.com/laasti/sessions/issues)[1 PRs](https://github.com/laasti/sessions/pulls)MITPHP

Since Apr 25Pushed 9y ago1 watchersCompare

[ Source](https://github.com/laasti/sessions)[ Packagist](https://packagist.org/packages/laasti/sessions)[ RSS](/packages/laasti-sessions/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (4)Versions (4)Used By (0)

Laasti/Sessions
===============

[](#laastisessions)

A nice simple session abstraction that works with PSR7 Http Message.

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

[](#installation)

```
composer require laasti/sessions

```

Usage
-----

[](#usage)

The package by default stores sessions to filesystem and persists sessions with cookies.

A middleware is responsible to insert the session in the request and to persist it in the response.

The middleware uses a HttpPersisterInterface which does all the background work to manipulate requests and responses.

\*\*A word of caution the id of a session is immutable. Changing the id with withSessionId results in a new instance.

For that reason, it is recommended that only middlewares should mess with the session id and each middleware is responsible for the persistence of its new session.

To ease the process, you can easily reuse the persister across multiple middlewares in case you need to regenerate the session.

The default Cookie persister does not overwrite the cookie if it already exists in the response.

Contributing
------------

[](#contributing)

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

History
-------

[](#history)

See Github's releases, or tags

Credits
-------

[](#credits)

Author: Sonia Marquette (@nebulousGirl)

License
-------

[](#license)

Released under the MIT License. See LICENSE.txt file.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Total

3

Last Release

3411d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48bb7fdba3e642d3dc668b9ff03ff949b9043f58096f3c85c13de508b53e7d68?d=identicon)[nebulousGirl](/maintainers/nebulousGirl)

---

Top Contributors

[![nebulousGirl](https://avatars.githubusercontent.com/u/1899256?v=4)](https://github.com/nebulousGirl "nebulousGirl (14 commits)")

### Embed Badge

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

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

###  Alternatives

[league/uri-interfaces

Common tools for parsing and resolving RFC3987/RFC3986 URI

538204.9M23](/packages/league-uri-interfaces)[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[php-heroku-client/php-heroku-client

A PHP client for the Heroku Platform API

24404.8k4](/packages/php-heroku-client-php-heroku-client)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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