PHPackages                             dustindoiron/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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. dustindoiron/session-encode-decode

AbandonedLibrary[Authentication &amp; Authorization](/categories/authentication)

dustindoiron/session-encode-decode
==================================

Storageless PSR-7 Session support

v1.1.1(3y ago)1233.0k—6%4MITPHPPHP &gt;=7.0

Since Aug 30Pushed 3y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (1)Versions (3)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

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~874 days

Total

3

Last Release

1435d ago

PHP version history (2 changes)1.0PHP ~7.0

v1.1.1PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/23e0f8cb9c397dea1d35da8b8f1c643d23cb6df89e77d0548ddb8a1db9b0fe19?d=identicon)[dustindoiron](/maintainers/dustindoiron)

---

Top Contributors

[![dustindoiron](https://avatars.githubusercontent.com/u/857244?v=4)](https://github.com/dustindoiron "dustindoiron (4 commits)")[![fizzka](https://avatars.githubusercontent.com/u/2384736?v=4)](https://github.com/fizzka "fizzka (1 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/dustindoiron-session-encode-decode/health.svg)

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

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[beatswitch/lock

A flexible, driver based Acl package for PHP 5.4+

870304.7k2](/packages/beatswitch-lock)[amocrm/amocrm-api-library

amoCRM API Client

182728.5k6](/packages/amocrm-amocrm-api-library)[vonage/jwt

A standalone package for creating JWTs for Vonage APIs

424.1M4](/packages/vonage-jwt)

PHPackages © 2026

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