PHPackages                             stechstudio/laravel-raw-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. stechstudio/laravel-raw-sessions

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

stechstudio/laravel-raw-sessions
================================

A raw PHP session handler for Laravel

0.2(3y ago)2297.1k↓14.4%1MITPHPPHP &gt;=5.4.0

Since Sep 16Pushed 3y ago5 watchersCompare

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

READMEChangelogDependenciesVersions (7)Used By (0)

Raw PHP session handler for Laravel
===================================

[](#raw-php-session-handler-for-laravel)

As of version 4.1.0 Laravel has removed the native session handler, and made it simply an alias for their file handler.

[http://wiki.laravel.io/Changelog\_(Laravel\_4)#Version\_4.1.0](http://wiki.laravel.io/Changelog_(Laravel_4)#Version_4.1.0)

This handler gives that back.

Why would you want this?
========================

[](#why-would-you-want-this)

Really you shouldn't want this. Laravel's own session management has some very cool advantages, and you should really use it.

Except when you can't.

Sometimes you may have a separate non-Laravel PHP app running on the same domain, that needs full session sharing. In our case, it was a legacy app that was being refactored in Laravel, but needed complete session sharing in the meantime.

Setup
=====

[](#setup)

First off add the composer dependency:

```
"require": {
    "stechstudio/laravel-raw-sessions" : "0.1.*"

```

Then of course update composer:

```
composer update

```

Now add the service provider to the array in `config/app.php`:

```
'providers' => array(
    ...
    'STS\Session\LaravelRawSessionServiceProvider',

```

In `config/session.php` set the `driver` to `raw`:

```
'driver' => 'raw',

```

And finally, make sure in that same file you turn off encryption. The only way we can have PHP manage the session is to tell Laravel not to encrypt it.

```
'encrypt' => false,

```

That's it! All your Laravel `Session` calls will be reading and writing to the raw `$_SESSION` array.

Namespace the session
=====================

[](#namespace-the-session)

You may wish to avoid polluting the root `$_SESSION` array, if you are sharing the session with other apps.

To change this, specify a `namespace` param in `config/session.php`:

```
'driver' => 'raw',
'namespace' => 'mynamespace',

```

This will cause Laravel to store all its session data under `$_SESSION['mynamespace']`.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

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

Total

5

Last Release

1280d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/315be5f111b5501a41b99a0205c9c85915335391168a0ed10316546a1a38bbd8?d=identicon)[jszobody](/maintainers/jszobody)

---

Top Contributors

[![jszobody](https://avatars.githubusercontent.com/u/203749?v=4)](https://github.com/jszobody "jszobody (13 commits)")

---

Tags

laravelsessions

### Embed Badge

![Health badge](/badges/stechstudio-laravel-raw-sessions/health.svg)

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

###  Alternatives

[jjgrainger/wp-crumbs

Simple Wordpress Breadcrumbs.

3910.9k](/packages/jjgrainger-wp-crumbs)[wantp/snowflake

A package for create unique id by snowflake

399.5k1](/packages/wantp-snowflake)

PHPackages © 2026

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