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

ActiveLibrary

stefna/session
==============

Session management for psr7/psr15

1.0.0(2y ago)01.2kmitPHPPHP ^8.2

Since Oct 25Pushed 2y ago3 watchersCompare

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

READMEChangelog (1)Dependencies (11)Versions (2)Used By (0)

Sessions for psr-15 and psr-7
=============================

[](#sessions-for-psr-15-and-psr-7)

[![Build Status](https://github.com/stefna/session/actions/workflows/continuous-integration.yml/badge.svg?branch=main)](https://github.com/stefna/session/actions/workflows/continuous-integration.yml)[![Latest Version on Packagist](https://camo.githubusercontent.com/81617f57c8e97807aa3725809b5368aa44c9c0a71f53730845e169ad58824b42/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737465666e612f73657373696f6e2e737667)](https://packagist.org/packages/stefna/session)[![Software License](https://camo.githubusercontent.com/eb5bb0c8105ff006f988e2a307fe8f84de6ee5e497627eedb8c24e7ccfe95d59/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f737465666e612f73657373696f6e2e737667)](LICENSE)

The package helps in working with sessions in a PSR-7/PSR-15 environment.

It also provides a flash message service which helps use one-time messages.

Requirements
------------

[](#requirements)

PHP 8.2 or higher.

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

[](#installation)

```
composer require stefna/session
```

### Session

[](#session)

In order to maintain a session between requests you need to add `SessionMiddleware`to middleware collection.

Then you will have access to the session storage in the request object and can be retrieved

```
