PHPackages                             fizzka/session-encode-decode - 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. fizzka/session-encode-decode

ActiveLibrary

fizzka/session-encode-decode
============================

Storageless PSR-7 Session support

v1.1.1(3y ago)058MITPHPPHP &gt;=7.0

Since Aug 30Pushed 3y agoCompare

[ Source](https://github.com/fizzka/session-encode-decode)[ Packagist](https://packagist.org/packages/fizzka/session-encode-decode)[ RSS](/packages/fizzka-session-encode-decode/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (5)Used By (0)

🔏 PSR7Session encoder/decoder
=============================

[](#lock_with_ink_pen-psr7session-encoderdecoder)

[![Build Status](https://camo.githubusercontent.com/912ff25e0496d2e41dcfc6a4b8cb0a75add94bfc0b0439bc74574979d7b4a907/68747470733a2f2f7472617669732d63692e6f72672f707372372d73657373696f6e732f73657373696f6e2d656e636f64652d6465636f64652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/psr7-sessions/session-encode-decode)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/404015e0a7ee3747425948cad0b9ee3cb4e6f4c8b6c6c038f11bb1efab042283/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f707372372d73657373696f6e732f73657373696f6e2d656e636f64652d6465636f64652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/psr7-sessions/session-encode-decode/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/19d2001296ec021804114c2ebc6171bfeba212ebeeace98971348f8826ad2dfd/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f707372372d73657373696f6e732f73657373696f6e2d656e636f64652d6465636f64652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/psr7-sessions/session-encode-decode/?branch=master)

This library provides a way to encode and decode default session data.

### Installation

[](#installation)

The suggested installation method is via [composer](https://getcomposer.org/):

```
composer require psr7-sessions/session-encode-decode

```

### Why this library?

[](#why-this-library)

PHP's native `session_encode()` and `session_decode()` functions has some limitations:

- session\_decode()

    - Can't be used if there's no session active
    - Populates the super global `$_SESSION` variable automatically
- session\_encode()

    - Do not accept parameters, so you can't use it to encode the content you want.
    - Depends on `$_SESSION` global state

### Encoding

[](#encoding)

```
(new PSR7SessionEncodeDecode\Encoder())->__invoke(['counter' => 2]); // 'counter|i:2;'
```

### Decoding

[](#decoding)

```
(new PSR7SessionEncodeDecode\Decoder())->__invoke('counter|i:2;'); // ['counter' => 2]
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~871 days

Total

3

Last Release

1441d ago

PHP version history (2 changes)v1.0.0PHP ~7.0

v1.1.1PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ff5d99372207454da4404d4c619ff55ab4d6b9cf9674d8a122507961b3a651f?d=identicon)[fizzka](/maintainers/fizzka)

---

Top Contributors

[![dustindoiron](https://avatars.githubusercontent.com/u/857244?v=4)](https://github.com/dustindoiron "dustindoiron (3 commits)")[![fizzka](https://avatars.githubusercontent.com/u/2384736?v=4)](https://github.com/fizzka "fizzka (2 commits)")[![twistor](https://avatars.githubusercontent.com/u/42400?v=4)](https://github.com/twistor "twistor (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fizzka-session-encode-decode/health.svg)

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

PHPackages © 2026

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